Skip to contentSkip to conversation

cluster/magma-plugins dumb/dumb.c gulm/gulm-lo ...

Cluster-devel [email protected] 1 participant 1 message Jun 16, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2006-06-16 19:54:57

Modified files:
magma-plugins/dumb: dumb.c
magma-plugins/gulm: gulm-lock.c gulm.c
magma-plugins/sm: sm.c

Log message:
Allow support for NULL locks in sm module. Set errno accordingly on gulm/dumb modules (#193128)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/dumb/dumb.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/gulm/gulm-lock.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/gulm/gulm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.6.2.6&r2=1.6.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/sm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.9.2.8&r2=1.9.2.9

magma-plugins/dumb/Attic/dumb.c +7 -1
@@ -35,7 +35,7 @@
 #include <netinet/in.h>
 #include <assert.h>
 
-#define MODULE_DESCRIPTION "Dumb Plugin v1.1"
+#define MODULE_DESCRIPTION "Dumb Plugin v1.1.1"
 #define MODULE_AUTHOR      "Lon Hohberger"
 #define DUMB_LOCK_PATH	   "/tmp/magma-dumb"
 
@@ -158,6 +158,12 @@
 
 	//printf("DUMB: %s called\n", __FUNCTION__);
 
+	if ((flags & CLK_EX) == 0) {
+		/* NULL lock not supported */
+		errno = EINVAL;
+		return -1;
+	}
+
 	fdp = malloc(sizeof(int));
 	if (!fdp)
 		return -1;
magma-plugins/gulm/Attic/gulm-lock.c +2 -1
@@ -269,13 +269,14 @@
 
 	*lockpp = NULL;
 
-	if (flags & CLK_EX) {
+	if ((flags & CLK_EX) == CLK_EX) {
 		state = lg_lock_state_Exclusive;
 	} else if (flags & CLK_READ) {
 		state = lg_lock_state_Shared;
 	} else if (flags & CLK_WRITE) {
 		state = lg_lock_state_Exclusive;
 	} else {
+		/* NULL Locks not supported on GULM */
 		errno = EINVAL;
 		return -1;
 	}
magma-plugins/gulm/Attic/gulm.c +1 -1
@@ -34,7 +34,7 @@
 #include <sys/types.h>
 #include <linux/unistd.h>
 
-#define MODULE_DESCRIPTION "GuLM Plugin v1.0.4"
+#define MODULE_DESCRIPTION "GuLM Plugin v1.0.5"
 #define MODULE_AUTHOR      "Lon Hohberger"
 
 
magma-plugins/sm/Attic/sm.c +47 -34

139 lines not on this page · raw message