summaryrefslogtreecommitdiff
path: root/c_src/cmd_image.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-08-18 14:00:27 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-08-18 14:00:27 -0400
commitcd01dec844837f929ff04e9e568b78cea2678932 (patch)
treefe50dd2ffb227bae2b51b2d646fad879b552e6de /c_src/cmd_image.c
parent45b2f382db4febb1db738785f870424aee22f01c (diff)
Commands called with no arguments now print usage
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'c_src/cmd_image.c')
-rw-r--r--c_src/cmd_image.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/c_src/cmd_image.c b/c_src/cmd_image.c
index 65bad661..9da3ed34 100644
--- a/c_src/cmd_image.c
+++ b/c_src/cmd_image.c
@@ -614,8 +614,10 @@ static int cmd_image_create(int argc, char *argv[])
}
args_shift(optind);
- if (argc != 1)
+ if (argc != 1) {
+ image_create_usage();
die("Please supply a filename for the new image");
+ }
dev_opts.path = argv[0];
@@ -784,8 +786,10 @@ static int cmd_image_update(int argc, char *argv[])
}
args_shift(optind);
- if (argc != 1)
+ if (argc != 1) {
+ image_update_usage();
die("Please supply a filename");
+ }
return image_update(source, argv[0],
keep_alloc, verbosity);