From df5ad409c22fca90dce8c76a83137f575fa2239c Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Tue, 7 Dec 2021 13:34:57 -0500 Subject: [PATCH] examples/blobcli: remove a redundant error prompt The details are as follows: ./build/examples/blobcli -h Error: -b option is required. (When we input '-h', this is a redundant error prompt) ...... Commands include: -b bdev - name of the block device to use (example: Nvme0n1) -d filename - dump contents of a blob to a file -D - dump metadata contents of an existing blobstore -f value - fill a blob with a decimal value -h - this help screen -i - initialize a blobstore ...... Change-Id: Ieccbcc56b02b10504170fb2e60090c25dc0d4b53 Signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10581 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki Reviewed-by: Paul Luse --- examples/blob/cli/blobcli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/blob/cli/blobcli.c b/examples/blob/cli/blobcli.c index 3415a580e..43db55496 100644 --- a/examples/blob/cli/blobcli.c +++ b/examples/blob/cli/blobcli.c @@ -1202,7 +1202,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) * We don't check the local boolean because in some modes it will have been set * on and earlier command. */ - if (strcmp(cli_context->bdev_name, "") == 0) { + if ((strcmp(cli_context->bdev_name, "") == 0) && (cli_context->action != CLI_HELP)) { usage(cli_context, "Error: -b option is required.\n"); cmd_chosen = 0; }