[U-Boot] [PATCH] mkenvimage: fix usage message

Wolfgang Denk wd at denx.de
Fri Mar 2 08:19:40 CET 2012

Don;t use argv[0] for usage() because it may or may not be clobbered
by the previous call to basename().  Use "prg" instead as it is done
in the rest of the code.

Signed-off-by: Wolfgang Denk <wd at denx.de>
 tools/mkenvimage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index f781731..64f5340 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -123,7 +123,7 @@ int main(int argc, char **argv)
 		case ':':
 			fprintf(stderr, "Missing argument for option -%c\n",
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 			fprintf(stderr, "Wrong option -%c\n", optopt);

More information about the U-Boot mailing list