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 <blobid> filename - dump contents of a blob to a file
        -D - dump metadata contents of an existing blobstore
        -f <blobid> value - fill a blob with a decimal value
        -h - this help screen
        -i - initialize a blobstore
......

Change-Id: Ieccbcc56b02b10504170fb2e60090c25dc0d4b53
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10581
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
wanghailiangx 2021-12-07 13:34:57 -05:00 committed by Tomasz Zawadzki
parent a2815831cc
commit df5ad409c2

View File

@ -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;
}