From: stefan at agner.ch Date: Thu, 08 Feb 2018 16:37:18 +0100 Subject: [U-Boot] [PATCH] Fix --noheader on fw_printenv In-Reply-To: <1518082525-5995-1-git-send-email-alex.kiernan@gmail.com> References: <1518082525-5995-1-git-send-email-alex.kiernan@gmail.com> Message-ID: <87b4ba805292e22e7c23f918ebe6aa9c@agner.ch> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08.02.2018 10:35, Alex Kiernan wrote: > Using fw_printenv with --noheader fails: > > root at nrr-922:~# fw_printenv --noheader arch > ## Error: `-n' option requires exactly one argument I think it would work with --noheader=arch > > 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. That makes sense. But the commit log text above is kind of unrelated/not relevant, I would just use this two lines as git message. -- Stefan > > 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}