[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ci-linux-devel
Subject:    [CI] [PATCH]Cluster Tools patch to make it work on Alpha Linux
From:       "Brian J. Watson" <Brian.J.Watson () compaq ! com>
Date:       2001-06-22 19:09:14
[Download RAW message or body]

Hi ,

 Some minor changes needed to make cluster tools work on Alpha  Linux.

 Note: I am not able to send mails to project mailing list because of
the exchange server issues over here. We are trying to fix it.

-aneesh
["cluster-tools-0.5.0-alpha.patch" (text/plain)]

diff -Nru cluster-tools-0.5.0/cmd/clusternode_getstate.c \
                cluster-tools-0.5.0-alpha/cmd/clusternode_getstate.c
--- cluster-tools-0.5.0/cmd/clusternode_getstate.c	Thu Jun  7 05:34:50 2001
+++ cluster-tools-0.5.0-alpha/cmd/clusternode_getstate.c	Fri Jun 22 15:20:01 2001
@@ -16,6 +16,14 @@
  *	Questions/Comments/Bugfixes to ci-linux-devel@linuxalpha.compaq.com
  *
  */
+/*
+ *
+ * 22JUN2001 aneesh.kumar@digital.com
+ * We need to check return values after calling function  clusternode_info.
+ * Otherwise following 'printf' will dump 
+ * 
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -71,8 +79,13 @@
 		exit(1);
 	}
 
-	(void)clusternode_info(node, sizeof(ni), &ni);
-	printf("%s\n", states[ni.node_state]);
+	if(clusternode_info(node, sizeof(ni), &ni) >= 0) {
+		printf("%s\n", states[ni.node_state]);
+	}
+	else {
+	 	printf("Error in getting the cluster information \n");
+	}
+	
 	
 	exit(0);
 }
diff -Nru cluster-tools-0.5.0/libcluster/clusternode_info.c \
                cluster-tools-0.5.0-alpha/libcluster/clusternode_info.c
--- cluster-tools-0.5.0/libcluster/clusternode_info.c	Thu Jun  7 05:34:50 2001
+++ cluster-tools-0.5.0-alpha/libcluster/clusternode_info.c	Fri Jun 15 10:36:19 2001
@@ -35,6 +35,8 @@
 	iovec.tio_udatain = (caddr_t)&args;
 	iovec.tio_udatainlen = sizeof(args);
 	iovec.tio_udataout = (caddr_t)nodeinfo;
+/* outlen is check inside kernel to be != 0  aneesh.kumar@digital.com */
+	iovec.tio_udataoutlen = sizeof(clusternode_info_t);
 	
 	return ssisys((char *)&iovec, sizeof(iovec));
 }



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic