summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-09-05 13:04:14 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-05 22:28:25 -0700
commit1fb0d35691d385fc7677e42d2e06bb089dbf0b8b (patch)
tree725da0090e1284c25a08bd22aeeea3c8c5d127e7
parentbe223c0df766cf1dae3672fc2e94604162ba9aa8 (diff)
cli: Display proper message when no volumes are present
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
-rw-r--r--cli/src/cli3_1-cops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index 67d469209a8..c9dbb5ee35a 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -1091,6 +1091,11 @@ gf_cli3_1_get_next_volume (call_frame_t *frame, xlator_t *this,
local = frame->local;
+ if (!local || !local->u.get_vol.volname) {
+ cli_out ("No volumes present");
+ goto out;
+ }
+
ctx->volname = local->u.get_vol.volname;
while (ctx->volname) {