From 8b1aac46732c871c6b97c1f2bbb7fcc5b79d52bd Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 23 Nov 2010 07:13:27 +0000 Subject: display the error to the user if volume stop is given on a volume which does not exist Signed-off-by: Raghavendra Bhat Signed-off-by: Anand V. Avati BUG: 2140 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2140 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 13227b610..e138399ba 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -580,8 +580,10 @@ glusterd_op_stage_stop_volume (gd1_mgmt_stage_op_req *req, char **op_errstr) exists = glusterd_check_volume_exists (volname); if (!exists) { - gf_log ("", GF_LOG_ERROR, "Volume with name %s does not exist", - volname); + snprintf (msg, 2048, "Volume with name %s does not exist", volname); + gf_log ("", GF_LOG_ERROR, "%s", + msg); + *op_errstr = gf_strdup (msg); ret = -1; } else { ret = 0; -- cgit