[sheepdog] [PATCH 3/3] collie: list available stores only when the wrong driver is specified

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sun Jul 29 19:54:18 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 collie/cluster.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/collie/cluster.c b/collie/cluster.c
index e70e7a4..bfa06ea 100644
--- a/collie/cluster.c
+++ b/collie/cluster.c
@@ -110,7 +110,10 @@ static int cluster_format(int argc, char **argv)
 	if (rsp->result != SD_RES_SUCCESS) {
 		fprintf(stderr, "Format failed: %s\n",
 				sd_strerror(rsp->result));
-		return list_store();
+		if (rsp->result == SD_RES_NO_STORE)
+			return list_store();
+		else
+			return EXIT_SYSFAIL;
 	}
 
 	return EXIT_SUCCESS;
-- 
1.7.2.5




More information about the sheepdog mailing list