From d3fe9591c29d871d4e2b5fb7424a09bd43080b05 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Tue, 12 Jan 2021 12:25:54 +0000 Subject: [PATCH] examples/nvme/identify: exit after showing help text Exit after showing the help text. If the user specifies -H, it is confusing that the regular execution of the program continues, which might mislead the user to think that the option they specified is not taking effect. Signed-off-by: Niklas Cassel Change-Id: I52d8e0f6c720c7ce1d66bddb99181babb12cef1f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5895 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- examples/nvme/identify/identify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 50d70262b..d0b612cad 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -2001,7 +2001,7 @@ parse_args(int argc, char **argv) break; case 'H': usage(argv[0]); - break; + exit(EXIT_SUCCESS); case 'V': g_vmd = true; break;