summaryrefslogtreecommitdiffstats
path: root/commands/nv.c
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2017-11-01 08:27:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-11-03 08:51:21 +0100
commit7bdd225eeb168498939b8d45d83f6b998ee3866f (patch)
tree6f31a8be4ccfdd12ef2b9c72d6964a17259e4fae /commands/nv.c
parented5d71ab06bf45e585f9d03049f4730109979aff (diff)
downloadbarebox-7bdd225eeb168498939b8d45d83f6b998ee3866f.tar.gz
commands: nv: fail with verbose message if invoked without args
Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/nv.c')
-rw-r--r--commands/nv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/nv.c b/commands/nv.c
index 37cdb96..798b1ea 100644
--- a/commands/nv.c
+++ b/commands/nv.c
@@ -55,8 +55,10 @@ static int do_nv(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (argc < 1)
+ if (argc < 1) {
+ printf("Invalid usage: Missing argument");
return COMMAND_ERROR_USAGE;
+ }
for (i = 0; i < argc; i++) {
value = strchr(argv[0], '=');