diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-08-18 14:00:27 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-08-27 18:47:54 -0400 |
commit | c12d7b3315734981d11cdd3ecb0f87e4c99aa033 (patch) | |
tree | edaaa92a8061e9e069a47e2a77efd1894cea116e /c_src/cmd_image.c | |
parent | 45b2f382db4febb1db738785f870424aee22f01c (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.c | 8 |
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); |