event: Change the base to 0 when calling strtol
Previously, we can -p + hex value(e.g., 0x1) to assign the master core and start the NVMe-oF or iSCSI target app. However now it is not supported and prints error. I checked the code, it only supports transformation with Decimal format, so chaning the base to 0 to make it supporting other formats. Change-Id: I82510ba0cef47b5593484b4fd3490f85c93cf6a5 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/c/444830 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
fdcd8b708a
commit
8bbf0391f6
@ -853,7 +853,7 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
|
|||||||
retval = SPDK_APP_PARSE_ARGS_HELP;
|
retval = SPDK_APP_PARSE_ARGS_HELP;
|
||||||
goto out;
|
goto out;
|
||||||
case SHM_ID_OPT_IDX:
|
case SHM_ID_OPT_IDX:
|
||||||
opts->shm_id = spdk_strtol(optarg, 10);
|
opts->shm_id = spdk_strtol(optarg, 0);
|
||||||
if (opts->shm_id < 0) {
|
if (opts->shm_id < 0) {
|
||||||
fprintf(stderr, "Invalid shared memory ID %s\n", optarg);
|
fprintf(stderr, "Invalid shared memory ID %s\n", optarg);
|
||||||
goto out;
|
goto out;
|
||||||
@ -863,14 +863,14 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
|
|||||||
opts->reactor_mask = optarg;
|
opts->reactor_mask = optarg;
|
||||||
break;
|
break;
|
||||||
case MEM_CHANNELS_OPT_IDX:
|
case MEM_CHANNELS_OPT_IDX:
|
||||||
opts->mem_channel = spdk_strtol(optarg, 10);
|
opts->mem_channel = spdk_strtol(optarg, 0);
|
||||||
if (opts->mem_channel < 0) {
|
if (opts->mem_channel < 0) {
|
||||||
fprintf(stderr, "Invalid memory channel %s\n", optarg);
|
fprintf(stderr, "Invalid memory channel %s\n", optarg);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MASTER_CORE_OPT_IDX:
|
case MASTER_CORE_OPT_IDX:
|
||||||
opts->master_core = spdk_strtol(optarg, 10);
|
opts->master_core = spdk_strtol(optarg, 0);
|
||||||
if (opts->master_core < 0) {
|
if (opts->master_core < 0) {
|
||||||
fprintf(stderr, "Invalid master core %s\n", optarg);
|
fprintf(stderr, "Invalid master core %s\n", optarg);
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user