From c12d7b3315734981d11cdd3ecb0f87e4c99aa033 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 18 Aug 2025 14:00:27 -0400 Subject: Commands called with no arguments now print usage Signed-off-by: Kent Overstreet --- c_src/cmd_format.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'c_src/cmd_format.c') diff --git a/c_src/cmd_format.c b/c_src/cmd_format.c index dfd54259..873c1a69 100644 --- a/c_src/cmd_format.c +++ b/c_src/cmd_format.c @@ -249,8 +249,10 @@ int cmd_format(int argc, char *argv[]) if (unconsumed_dev_option) die("Options for devices apply to subsequent devices; got a device option with no device"); - if (!devices.nr) + if (!devices.nr) { + format_usage(); die("Please supply a device"); + } if (opts.source && !initialize) die("--source, --no_initialize are incompatible"); -- cgit v1.2.3