[sheepdog] [PATCH] sheep: do not return a fd from cluster driver init

Christoph Hellwig hch at infradead.org
Tue Jun 5 14:32:56 CEST 2012


Now that all event handling is inside the cluster drivers we can just return 0
from ->init instead of the file descriptor.

Signed-off-by: Christoph Hellwig <hch at lst.de>

Index: sheepdog/sheep/cluster/accord.c
===================================================================
--- sheepdog.orig/sheep/cluster/accord.c	2012-06-05 08:20:32.964172021 -0400
+++ sheepdog/sheep/cluster/accord.c	2012-06-05 08:21:19.320173209 -0400
@@ -627,7 +627,7 @@ static int accord_init(const char *optio
 		return -1;
 	}
 
-	return efd;
+	return 0;
 }
 
 struct cluster_driver cdrv_accord = {
Index: sheepdog/sheep/cluster/corosync.c
===================================================================
--- sheepdog.orig/sheep/cluster/corosync.c	2012-06-05 08:20:32.964172021 -0400
+++ sheepdog/sheep/cluster/corosync.c	2012-06-05 08:21:19.320173209 -0400
@@ -725,7 +725,7 @@ static int corosync_init(const char *opt
 		return -1;
 	}
 
-	return fd;
+	return 0;
 }
 
 struct cluster_driver cdrv_corosync = {
Index: sheepdog/sheep/cluster/local.c
===================================================================
--- sheepdog.orig/sheep/cluster/local.c	2012-06-05 08:20:32.964172021 -0400
+++ sheepdog/sheep/cluster/local.c	2012-06-05 08:21:19.320173209 -0400
@@ -452,7 +452,7 @@ static int local_init(const char *option
 		return -1;
 	}
 
-	return sigfd;
+	return 0;
 }
 
 struct cluster_driver cdrv_local = {
Index: sheepdog/sheep/cluster/zookeeper.c
===================================================================
--- sheepdog.orig/sheep/cluster/zookeeper.c	2012-06-05 08:20:32.964172021 -0400
+++ sheepdog/sheep/cluster/zookeeper.c	2012-06-05 08:21:19.320173209 -0400
@@ -868,7 +868,7 @@ static int zk_init(const char *option, u
 		return -1;
 	}
 
-	return efd;
+	return 0;
 }
 
 struct cluster_driver cdrv_zookeeper = {



More information about the sheepdog mailing list