summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index c3d242d8..c2839c45 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -130,8 +130,11 @@ main(int argc, char *argv[])
for (int i = 0; (i < 6) && (cmd == NULL); i++) {
if (strcmp(COMMAND, op[i].str) != 0)
continue;
- if (argc >= op[i].args)
+ if (argc >= op[i].args) {
cmd = op[i].cmd;
+ break;
+ }
+ err(errno = EINVAL, "Too few args on command '%s'", op[i].str);
}
if (cmd == cmd_setmac) {