summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 72b77852acb..00919d2c7a7 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -9903,7 +9903,7 @@ cli_populate_req_dict_for_status (dict_t *snap_dict, dict_t *dict, int index) {
GF_ASSERT (dict);
ret = dict_set_uint32 (snap_dict, "sub-cmd",
- GF_SNAP_STATUS_TYPE_SNAP);
+ GF_SNAP_STATUS_TYPE_ITER);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Could not save command "
"type in snap dict");
@@ -9995,7 +9995,8 @@ cli_snapshot_status (dict_t *dict, gf_cli_rsp *rsp,
goto out;
}
- if (status_cmd != GF_SNAP_STATUS_TYPE_SNAP) {
+ if ((status_cmd != GF_SNAP_STATUS_TYPE_SNAP) &&
+ (status_cmd != GF_SNAP_STATUS_TYPE_ITER)) {
dict_copy (dict, local->dict);
goto out;
}
@@ -10479,7 +10480,8 @@ gf_cli_snapshot_for_status (call_frame_t *frame, xlator_t *this,
* is already handled. Therefore we can return from here.
* If want to get status of all snaps in the system or volume then
* we should get them one by one.*/
- if (cmd == GF_SNAP_STATUS_TYPE_SNAP) {
+ if ((cmd == GF_SNAP_STATUS_TYPE_SNAP) ||
+ (cmd == GF_SNAP_STATUS_TYPE_ITER)) {
ret = 0;
goto out;
}