summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 290808d3..55d7e5f6 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -73,7 +73,8 @@ void (*cmd)(void) = NULL;
int
main(int argc, char *argv[])
{
- err_if((errno = argc < 3 ? EINVAL : errno));
+ if (argc < 3)
+ err(errno = ECANCELED, "Too few arguments");
flags = (strcmp(COMMAND, "dump") == 0) ? O_RDONLY : flags;
filename = argv[1];
#ifdef __OpenBSD__