From: Alex Kiernan Date: Thu, 8 Feb 2018 09:35:25 +0000 Subject: [U-Boot] [PATCH] Fix --noheader on fw_printenv Message-ID: <1518082525-5995-1-git-send-email-alex.kiernan@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Using fw_printenv with --noheader fails: root at nrr-922:~# fw_printenv --noheader arch ## Error: `-n' option requires exactly one argument Whereas -n works: root at nrr-922:~# fw_printenv -n arch arm The single argument it's expecting isn't taken from getopt parsing, but instead from the remaining argv arguments. Signed-off-by: Alex Kiernan --- tools/env/fw_env_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c index 6fdf41c..d93a915 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} -- 2.7.4