diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2018-02-11 20:16:46 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-14 20:14:15 +0300 |
commit | d877a6c50e886af089bf8fb947e566982672fd0a (patch) | |
tree | eece0d31019901fa9e2394701b39a9267d0ee4ec /tools/env | |
parent | beffc170f204277451d4b9df791c1e2b8c49e8a9 (diff) | |
download | u-boot-d877a6c50e886af089bf8fb947e566982672fd0a.tar.xz |
Fix --noheader on fw_printenv
The single argument `--noheader' is expecting isn't taken from getopt
parsing, but instead from the remaining argv arguments.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Diffstat (limited to 'tools/env')
-rw-r--r-- | tools/env/fw_env.c | 2 | ||||
-rw-r--r-- | tools/env/fw_env_main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index ca5507d4d7..6b71acb28f 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -452,7 +452,7 @@ int fw_printenv(int argc, char *argv[], int value_only, struct env_opts *opts) if (value_only && argc != 1) { fprintf(stderr, - "## Error: `-n' option requires exactly one argument\n"); + "## Error: `-n'/`--noheader' option requires exactly one argument\n"); return -1; } diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c index 6fdf41c876..d93a915fd1 100644 --- a/tools/env/fw_env_main.c +++ b/tools/env/fw_env_main.c @@ -46,7 +46,7 @@ static struct option long_options[] = { {"config", required_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"script", required_argument, NULL, 's'}, - {"noheader", required_argument, NULL, 'n'}, + {"noheader", no_argument, NULL, 'n'}, {"lock", required_argument, NULL, 'l'}, {"version", no_argument, NULL, 'v'}, {NULL, 0, NULL, 0} |