summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2014-03-14 07:23:18 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-03-14 02:35:16 -0700
commitbc8a9a21f8e3184b2138be3ca10280dfde3ce153 (patch)
tree4e3da16321a1787a8e36a1179b8bd1005f09101d /cli/src/cli-rpc-ops.c
parent69827bac7215f269a2d29b4b9f9bd86092517d55 (diff)
cli/snapshot : Fix for snapshot create fail.
Change-Id: Ib3c239eadbcfc787f4f7d0734839c8425e93020a BUG: 1076356 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7275 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index a958286..e8cda53 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -7956,6 +7956,10 @@ cli_call_snapshot_info (dict_t *dict, gf_boolean_t bool_snap_driven) {
goto out;
}
+ if (snap_count == 0) {
+ cli_out ("No snapshots present");
+ }
+
for (i = 1 ; i <= snap_count ; i++) {
ret = snprintf (key, sizeof (key), "snap%d", i);
if (ret < 0) {
@@ -8046,6 +8050,10 @@ cli_snapshot_list (dict_t *dict) {
goto out;
}
+ if (snapcount == 0) {
+ cli_out ("No snapshots present");
+ }
+
for (i = 1 ; i <= snapcount ; i++) {
ret = snprintf (key, sizeof (key), "snapname%d",i);
if (ret < 0) {
@@ -8257,6 +8265,10 @@ cli_snap_status_all (dict_t *dict) {
goto out;
}
+ if (snapcount == 0) {
+ cli_out ("No snapshots present");
+ }
+
for (i = 0 ; i < snapcount; i++) {
ret = snprintf (key, sizeof (key), "status.snap%d",i);
if (ret < 0) {