[Sheepdog] [PATCH 2/2] collie: fix cluster info command
Liu Yuan
namei.unix at gmail.com
Fri Sep 23 08:36:11 CEST 2011
From: Liu Yuan <tailai.ly at taobao.com>
We should return with failure status when response is not
SD_RES_SUCCESS.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
collie/cluster.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/collie/cluster.c b/collie/cluster.c
index 0d5dfbe..6c28b6f 100644
--- a/collie/cluster.c
+++ b/collie/cluster.c
@@ -91,8 +91,10 @@ static int cluster_info(int argc, char **argv)
printf("Cluster status: ");
if (rsp->result == SD_RES_SUCCESS)
printf("running\n");
- else
+ else {
printf("%s\n", sd_strerror(rsp->result));
+ return EXIT_FAILURE;
+ }
if (!raw_output)
printf("\nCreation time Epoch Nodes\n");
--
1.7.6.1
More information about the sheepdog
mailing list