diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-11-23 07:13:27 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-11-24 00:33:45 -0800 |
commit | 8b1aac46732c871c6b97c1f2bbb7fcc5b79d52bd (patch) | |
tree | 764b3251cf850d465afae3362d827e9fbde8163f /xlators/mgmt/glusterd | |
parent | 0ccd9f4f2ddf83d35cfa9bbc872ca84f6fb9c8a9 (diff) |
display the error to the user if volume stop is given on a volume which does not exist
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2140 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2140
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 6 |
1 files 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 13227b61052..e138399ba0d 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; |