summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Hobi <daniel.hobi@schmid-telecom.ch>2010-09-15 17:46:26 (GMT)
committerWolfgang Denk <wd@denx.de>2010-09-18 21:56:02 (GMT)
commit122bc08845c25367d23e3d7a74c29b7d1ac07234 (patch)
tree8b31c7f8e5b6d702779829b2cc9645b4501b2228 /tools
parentc54b5923dad53af7737c8c7d21259f11b674f986 (diff)
downloadu-boot-122bc08845c25367d23e3d7a74c29b7d1ac07234.tar.xz
tools/env: allow option "-n" for fw_printenv
In commit bd7b26f8 (Tools: set multiple variable with fw_setenv utility), the option parsing was changed to getopt_long(3), but option "-n" of fw_printenv was not included. This leads to an error message "invalid option -- 'n'" on stderr, although the output on stdout is correct. Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
Diffstat (limited to 'tools')
-rw-r--r--tools/env/fw_env_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
index 82116b4..baf3a4d 100644
--- a/tools/env/fw_env_main.c
+++ b/tools/env/fw_env_main.c
@@ -59,7 +59,7 @@ void usage(void)
fprintf(stderr, "fw_printenv/fw_setenv, "
"a command line interface to U-Boot environment\n\n"
- "usage:\tfw_printenv\n"
+ "usage:\tfw_printenv [-n] [variable name]\n"
"\tfw_setenv [variable name] [variable value]\n"
"\tfw_setenv -s [ file ]\n"
"\tfw_setenv -s - < [ file ]\n\n"
@@ -93,9 +93,12 @@ main(int argc, char *argv[])
cmdname = p + 1;
}
- while ((c = getopt_long (argc, argv, "s:h",
+ while ((c = getopt_long (argc, argv, "ns:h",
long_options, NULL)) != EOF) {
switch (c) {
+ case 'n':
+ /* handled in fw_printenv */
+ break;
case 's':
script_file = optarg;
break;