[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence fence_node/fence_node.c fenced/a ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2007-02-22 16:12:43

Modified files:
	fence/fence_node: fence_node.c 
	fence/fenced   : agent.c fd.h recover.c 

Log message:
	remove the self paramter (sync up with RHEL5 branch)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/agent.c.diff?cvsroot=cluster&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/fd.h.diff?cvsroot=cluster&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/recover.c.diff?cvsroot=cluster&r1=1.26&r2=1.27

--- cluster/fence/fence_node/fence_node.c	2006/07/10 17:05:53	1.7
+++ cluster/fence/fence_node/fence_node.c	2007/02/22 16:12:41	1.8
@@ -20,7 +20,7 @@
 #include "copyright.cf"
 #include "ccs.h"
 
-#define OPTION_STRING           ("hOs:uV")
+#define OPTION_STRING           ("hOuV")
 
 #define die(fmt, args...) \
 do \
@@ -34,7 +34,7 @@
 static char *prog_name;
 static int force;
 
-int dispatch_fence_agent(int cd, char *victim, char *self);
+int dispatch_fence_agent(int cd, char *victim);
 
 static void print_usage(void)
 {
@@ -46,7 +46,6 @@
 	printf("\n");
 	printf("  -h               Print this help, then exit\n");
 	printf("  -O               Force connection to CCS\n");
-	printf("  -s               Name of current node\n");
 	printf("  -V               Print program version information, then exit\n");
 	printf("\n");
 }
@@ -55,7 +54,6 @@
 {
 	int cont = 1, optchar, error, cd;
 	char *victim = NULL;
-	char *self = NULL;
 
 	prog_name = argv[0];
 
@@ -69,10 +67,6 @@
 			exit(EXIT_SUCCESS);
 			break;
 
-		case 's':
-			self = optarg;
-			break;
-
 		case 'O':
 			force = 1;
 			break;
@@ -122,7 +116,7 @@
 		goto fail;
 	}
 
-	error = dispatch_fence_agent(cd, victim, self);
+	error = dispatch_fence_agent(cd, victim);
 	if (error)
 		goto fail_ccs;
 
--- cluster/fence/fenced/agent.c	2006/07/10 17:02:43	1.15
+++ cluster/fence/fenced/agent.c	2007/02/22 16:12:42	1.16
@@ -129,7 +129,7 @@
 	return -1;
 }
 
-static int make_args(int cd, char *victim, char *self, char *method, int d,
+static int make_args(int cd, char *victim, char *method, int d,
 		     char *device, char **args_out)
 {
 	char path[256], *args, *str;
@@ -180,13 +180,6 @@
 		free(str);
 	}
 
-	if (self != NULL) {
-		memset(path, 0, 256);
-		sprintf(path, "self=%s", self);
-		strcat(args, path);
-		strcat(args, "\n");
-	}
-
 	if (error) {
 		free(args);
 		args = NULL;
@@ -260,7 +253,7 @@
 	return i;
 }
 
-static int use_device(int cd, char *victim, char *self,char *method, int d,
+static int use_device(int cd, char *victim, char *method, int d,
 		      char *device)
 {
 	char path[256], *agent, *args = NULL;
@@ -273,7 +266,7 @@
 	if (error)
 		goto out;
 
-	error = make_args(cd, victim, self, method, d, device, &args);
+	error = make_args(cd, victim, method, d, device, &args);
 	if (error)
 		goto out_agent;
 
@@ -309,7 +302,7 @@
 	cman_finish(ch);
 }
 
-int dispatch_fence_agent(int cd, char *victim, char *self)
+int dispatch_fence_agent(int cd, char *victim)
 {
 	char *method = NULL, *device = NULL;
 	int num_methods, num_devices, m, d, error = -1;
@@ -332,7 +325,7 @@
 			if (error)
 				break;
 
-			error = use_device(cd, victim, self, method, d, device);
+			error = use_device(cd, victim, method, d, device);
 			if (error)
 				break;
 
--- cluster/fence/fenced/fd.h	2007/01/22 23:15:54	1.25
+++ cluster/fence/fenced/fd.h	2007/02/22 16:12:42	1.26
@@ -176,7 +176,7 @@
 void do_recovery_done(fd_t *fd);
 
 /* agent.c */
-int dispatch_fence_agent(int cd, char *victim, char *self);
+int dispatch_fence_agent(int cd, char *victim);
 
 /* group.c */
 int setup_groupd(void);
--- cluster/fence/fenced/recover.c	2007/01/22 23:15:54	1.26
+++ cluster/fence/fenced/recover.c	2007/02/22 16:12:42	1.27
@@ -19,7 +19,6 @@
 
 extern int our_nodeid;
 extern commandline_t comline;
-extern char *our_name;
 
 /* Fencing recovery algorithm
 
@@ -387,7 +386,7 @@
 		log_debug("fencing node %s", node->name);
 		syslog(LOG_INFO, "fencing node \"%s\"", node->name);
 
-		error = dispatch_fence_agent(cd, node->name, our_name);
+		error = dispatch_fence_agent(cd, node->name);
 
 		syslog(LOG_INFO, "fence \"%s\" %s", node->name,
 		       error ? "failed" : "success");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]