LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cman_tool_display_meaningful_translation_of_corosync_exit_codes.patch of Package cluster (Project home:sschapiro:openstack:upstream)

commit cdb8831463fd622a1bc24af5f9760ae0f456b039
Author: Jan Friesse <jfriesse@redhat.com>
Date:   Mon Sep 27 15:20:16 2010 +0200

    Cman: Handle corosync exit codes
    
    Resolves: rhbz#617247

diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c
index c6cf4ef..ed8b535 100644
--- a/cman/cman_tool/join.c
+++ b/cman/cman_tool/join.c
@@ -40,45 +40,51 @@ static const char *corosync_exit_reason(signed char status)
 {
 	static char reason[256];
 	switch (status) {
-	case -2:
+	case 1:
 		return "Could not determine UID to run as";
 		break;
-	case -3:
+	case 2:
 		return "Could not determine GID to run as";
 		break;
-	case -4:
+	case 3:
 		return "Error initialising memory pool";
 		break;
-	case -5:
+	case 4:
 		return "Could not fork";
 		break;
-	case -6:
+	case 5:
 		return "Could not bind to libais socket";
 		break;
-	case -7:
+	case 6:
 		return "Could not bind to network socket";
 		break;
-	case -8:
+	case 7:
 		return "Could not read security key for communications";
 		break;
-	case -9:
+	case 8:
 		return "Could not read cluster configuration";
 		break;
-	case -10:
+	case 9:
 		return "Could not set up logging";
 		break;
-	case -11:
+	case 11:
 		return "Could not dynamically load modules";
 		break;
-	case -12:
+	case 12:
 		return "Could not load and initialise object database";
 		break;
-	case -13:
+	case 13:
 		return "Could not initialise all required services";
 		break;
-	case -14:
+	case 14:
 		return "Out of memory";
 		break;
+	case 15:
+		return "Fatal error";
+		break;
+	case 16:
+		return "Required directory not present /var/lib/corosync.";
+		break;
 	default:
 		sprintf(reason, "Error, reason code is %d", status);
 		return reason;