From 4952f2540f13883828d27f0a71d938ec7dd8371d Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 20 Nov 2017 16:16:37 -0700 Subject: [PATCH] blobcli: add _blob suffix to dump and import Rename these operations in preparation for adding blobstore dump and import operations in a future patch. Change-Id: I5ab60d1354099502049826f22930131a7870de87 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/388325 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- examples/blob/cli/blobcli.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/blob/cli/blobcli.c b/examples/blob/cli/blobcli.c index 26ee08d04..0ab801ed7 100644 --- a/examples/blob/cli/blobcli.c +++ b/examples/blob/cli/blobcli.c @@ -68,8 +68,8 @@ enum cli_mode_type { enum cli_action_type { CLI_NONE, - CLI_IMPORT, - CLI_DUMP, + CLI_IMPORT_BLOB, + CLI_DUMP_BLOB, CLI_FILL, CLI_REM_XATTR, CLI_SET_XATTR, @@ -694,7 +694,7 @@ dump_imp_open_cb(void *cb_arg, struct spdk_blob *blob, int bserrno) printf("Working"); cli_context->blob_pages = spdk_blob_get_num_pages(cli_context->blob); cli_context->page_count = 0; - if (cli_context->action == CLI_DUMP) { + if (cli_context->action == CLI_DUMP_BLOB) { cli_context->fp = fopen(cli_context->file, "w"); if (cli_context->fp == NULL) { printf("Error in opening file\n"); @@ -843,8 +843,8 @@ load_bs_cb(void *arg1, struct spdk_blob_store *bs, int bserrno) spdk_bs_md_iter_first(cli_context->bs, blob_iter_cb, cli_context); break; - case CLI_DUMP: - case CLI_IMPORT: + case CLI_DUMP_BLOB: + case CLI_IMPORT_BLOB: spdk_bs_md_open_blob(cli_context->bs, cli_context->blobid, dump_imp_open_cb, cli_context); break; @@ -994,7 +994,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) case 'd': if (argv[optind] != NULL) { cmd_chosen++; - cli_context->action = CLI_DUMP; + cli_context->action = CLI_DUMP_BLOB; cli_context->blobid = atoll(optarg); snprintf(cli_context->file, BUFSIZE, "%s", argv[optind]); } else { @@ -1058,7 +1058,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context) case 'm': if (argv[optind] != NULL) { cmd_chosen++; - cli_context->action = CLI_IMPORT; + cli_context->action = CLI_IMPORT_BLOB; cli_context->blobid = atoll(optarg); snprintf(cli_context->file, BUFSIZE, "%s", argv[optind]); } else { @@ -1372,8 +1372,8 @@ cli_start(void *arg1, void *arg2) case CLI_REM_XATTR: case CLI_SHOW_BLOB: case CLI_LIST_BLOBS: - case CLI_DUMP: - case CLI_IMPORT: + case CLI_DUMP_BLOB: + case CLI_IMPORT_BLOB: case CLI_FILL: load_bs(cli_context); break;