spdk_top: fix -h option handling
-H is not specified to getopt, so there's no reason to have a case statement for it. We should also return 0 when -h is specified. spdk_top -h should not return error status to the shell since this is valid usage. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ifa24c93661648c61de6925bea4b4071cd53013d4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6327 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: <dongx.yi@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
1ed57e1fb6
commit
933868afe5
@ -2468,10 +2468,9 @@ int main(int argc, char **argv)
|
|||||||
case 'r':
|
case 'r':
|
||||||
socket = optarg;
|
socket = optarg;
|
||||||
break;
|
break;
|
||||||
case 'H':
|
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
return 1;
|
return op == 'h' ? 0 : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user