summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index adfb85e9e..2ad5d430c 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2780,7 +2780,7 @@ cli_snap_create_desc_parse (dict_t *dict, const char **words,
desc[desc_len] = '\0';
/* Calculating the size of the description as given by the user */
- ret = dict_set_dynstr (dict, "snap-description", desc);
+ ret = dict_set_dynstr (dict, "description", desc);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to save snap "
"description");
@@ -3008,6 +3008,7 @@ cli_snap_info_parse (dict_t *dict, const char **words, int wordcount,
unsigned int cmdi) {
int ret = -1;
+ int32_t cmd = GF_SNAP_INFO_TYPE_ALL;
GF_ASSERT (words);
GF_ASSERT (dict);
@@ -3044,6 +3045,7 @@ cli_snap_info_parse (dict_t *dict, const char **words, int wordcount,
goto out;
}
+ cmd = GF_SNAP_INFO_TYPE_SNAP;
ret = 0;
goto out;
/* No need to continue the parsing once we
@@ -3067,7 +3069,15 @@ cli_snap_info_parse (dict_t *dict, const char **words, int wordcount,
"volume name %s", words[wordcount - 1]);
goto out;
}
+ cmd = GF_SNAP_INFO_TYPE_VOL;
out :
+ if (ret == 0) {
+ ret = dict_set_int32 (dict, "cmd", cmd);
+ if (ret) {
+ gf_log ("cli", GF_LOG_ERROR, "Could not save "
+ "type of snapshot info");
+ }
+ }
return ret;
}