Commit 8bbf0391 authored by Ziye Yang's avatar Ziye Yang Committed by Darek Stojaczyk
Browse files

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: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/444830


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent fdcd8b70
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -853,7 +853,7 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
			retval = SPDK_APP_PARSE_ARGS_HELP;
			goto out;
		case SHM_ID_OPT_IDX:
			opts->shm_id = spdk_strtol(optarg, 10);
			opts->shm_id = spdk_strtol(optarg, 0);
			if (opts->shm_id < 0) {
				fprintf(stderr, "Invalid shared memory ID %s\n", optarg);
				goto out;
@@ -863,14 +863,14 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
			opts->reactor_mask = optarg;
			break;
		case MEM_CHANNELS_OPT_IDX:
			opts->mem_channel = spdk_strtol(optarg, 10);
			opts->mem_channel = spdk_strtol(optarg, 0);
			if (opts->mem_channel < 0) {
				fprintf(stderr, "Invalid memory channel %s\n", optarg);
				goto out;
			}
			break;
		case MASTER_CORE_OPT_IDX:
			opts->master_core = spdk_strtol(optarg, 10);
			opts->master_core = spdk_strtol(optarg, 0);
			if (opts->master_core < 0) {
				fprintf(stderr, "Invalid master core %s\n", optarg);
				goto out;