diff --git a/examples/blob/cli/blobcli.c b/examples/blob/cli/blobcli.c index bb01e5a28..7238284e6 100644 --- a/examples/blob/cli/blobcli.c +++ b/examples/blob/cli/blobcli.c @@ -1070,7 +1070,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) if (argv[optind] != NULL) { cmd_chosen++; cli_context->action = CLI_DUMP_BLOB; - cli_context->blobid = atoll(optarg); + cli_context->blobid = spdk_strtoll(optarg, 10); snprintf(cli_context->file, BUFSIZE, "%s", argv[optind]); } else { usage(cli_context, "ERROR: missing parameter.\n"); @@ -1080,7 +1080,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) if (argv[optind] != NULL) { cmd_chosen++; cli_context->action = CLI_FILL; - cli_context->blobid = atoll(optarg); + cli_context->blobid = spdk_strtoll(optarg, 10); cli_context->fill_value = spdk_strtol(argv[optind], 10); } else { usage(cli_context, "ERROR: missing parameter.\n"); @@ -1113,7 +1113,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) if (argv[optind] != NULL) { cmd_chosen++; cli_context->action = CLI_REM_XATTR; - cli_context->blobid = atoll(optarg); + cli_context->blobid = spdk_strtoll(optarg, 10); snprintf(cli_context->key, BUFSIZE, "%s", argv[optind]); } else { usage(cli_context, "ERROR: missing parameter.\n"); @@ -1134,7 +1134,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) if (argv[optind] != NULL) { cmd_chosen++; cli_context->action = CLI_IMPORT_BLOB; - cli_context->blobid = atoll(optarg); + cli_context->blobid = spdk_strtoll(optarg, 10); snprintf(cli_context->file, BUFSIZE, "%s", argv[optind]); } else { usage(cli_context, "ERROR: missing parameter.\n"); @@ -1152,7 +1152,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) case 'p': cmd_chosen++; cli_context->action = CLI_SET_SUPER; - cli_context->superid = atoll(optarg); + cli_context->superid = spdk_strtoll(optarg, 10); break; case 'S': if (cli_context->cli_mode == CLI_MODE_CMD) { @@ -1167,7 +1167,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) cli_context->action = CLI_SHOW_BS; } else { cli_context->action = CLI_SHOW_BLOB; - cli_context->blobid = atoll(optarg); + cli_context->blobid = spdk_strtoll(optarg, 10); } break; case 'T': @@ -1192,7 +1192,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) if (argv[optind] != NULL || argv[optind + 1] != NULL) { cmd_chosen++; cli_context->action = CLI_SET_XATTR; - cli_context->blobid = atoll(optarg); + cli_context->blobid = spdk_strtoll(optarg, 10); snprintf(cli_context->key, BUFSIZE, "%s", argv[optind]); snprintf(cli_context->value, BUFSIZE, "%s", argv[optind + 1]); } else {