From 1fb0d35691d385fc7677e42d2e06bb089dbf0b8b Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sun, 5 Sep 2010 13:04:14 +0000 Subject: cli: Display proper message when no volumes are present Signed-off-by: Vijay Bellur Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- cli/src/cli3_1-cops.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli') 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) { -- cgit