mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
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>
This commit is contained in:
2
tools/env/fw_env.c
vendored
2
tools/env/fw_env.c
vendored
@@ -452,7 +452,7 @@ int fw_printenv(int argc, char *argv[], int value_only, struct env_opts *opts)
|
|||||||
|
|
||||||
if (value_only && argc != 1) {
|
if (value_only && argc != 1) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"## Error: `-n' option requires exactly one argument\n");
|
"## Error: `-n'/`--noheader' option requires exactly one argument\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
tools/env/fw_env_main.c
vendored
2
tools/env/fw_env_main.c
vendored
@@ -46,7 +46,7 @@ static struct option long_options[] = {
|
|||||||
{"config", required_argument, NULL, 'c'},
|
{"config", required_argument, NULL, 'c'},
|
||||||
{"help", no_argument, NULL, 'h'},
|
{"help", no_argument, NULL, 'h'},
|
||||||
{"script", required_argument, NULL, 's'},
|
{"script", required_argument, NULL, 's'},
|
||||||
{"noheader", required_argument, NULL, 'n'},
|
{"noheader", no_argument, NULL, 'n'},
|
||||||
{"lock", required_argument, NULL, 'l'},
|
{"lock", required_argument, NULL, 'l'},
|
||||||
{"version", no_argument, NULL, 'v'},
|
{"version", no_argument, NULL, 'v'},
|
||||||
{NULL, 0, NULL, 0}
|
{NULL, 0, NULL, 0}
|
||||||
|
Reference in New Issue
Block a user