From b0304d47f67aa8fa677e4898fa46b96df88c8322 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Fri, 6 Aug 2010 07:49:36 +0000 Subject: glusterd: Set right return value during delete volume Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 1191 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1191 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 8f6861417..b70705508 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -477,6 +477,7 @@ glusterd_op_stage_delete_volume (gd1_mgmt_stage_op_req *req) gf_log ("", GF_LOG_ERROR, "Volume with name %s does not exist", volname); ret = -1; + goto out; } else { ret = 0; } @@ -492,6 +493,7 @@ glusterd_op_stage_delete_volume (gd1_mgmt_stage_op_req *req) gf_log ("", GF_LOG_ERROR, "Volume %s has been started." "Volume needs to be stopped before deletion.", volname); + ret = -1; goto out; } -- cgit