This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - rgmanager: Fix fo_domain.c build warnings


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5877ba9d084f31e7de9894627e54debb7425f877
Commit:        5877ba9d084f31e7de9894627e54debb7425f877
Parent:        564bb8c94398d72a88ca485161bbd3708d40acc9
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Mon Jun 15 16:51:52 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Jun 22 09:32:02 2009 -0400

rgmanager: Fix fo_domain.c build warnings

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/include/fo_domain.h     |   48 +++++++++++++++++++++++++++++++++++++
 rgmanager/src/daemons/fo_domain.c |   24 +++---------------
 2 files changed, 52 insertions(+), 20 deletions(-)

diff --git a/rgmanager/include/fo_domain.h b/rgmanager/include/fo_domain.h
new file mode 100644
index 0000000..bc2b1b1
--- /dev/null
+++ b/rgmanager/include/fo_domain.h
@@ -0,0 +1,48 @@
+#ifndef _FO_DOMAIN_H
+#define _FO_DOMAIN_H
+
+/*
+ * Fail-over domain states
+ */
+#define FOD_ILLEGAL		0
+#define FOD_GOOD		1
+#define FOD_BETTER		2
+#define FOD_BEST		3
+
+/* 
+   Fail-over domain flags
+ */
+#define FOD_ORDERED		(1<<0)
+#define FOD_RESTRICTED		(1<<1)
+#define FOD_NOFAILBACK		(1<<2)
+
+ 
+typedef struct _fod_node {
+	list_head();
+	char	*fdn_name;
+	int	fdn_prio;
+	int	fdn_nodeid;
+} fod_node_t;
+
+typedef struct _fod {
+	list_head();
+	char	*fd_name;
+	fod_node_t	*fd_nodes;
+	int	fd_flags;
+	int	_pad_; /* align */
+} fod_t;
+
+ 
+/*
+   Construct/deconstruct failover domains
+ */
+int construct_domains(int ccsfd, fod_t **domains);
+void deconstruct_domains(fod_t **domains);
+void print_domains(fod_t **domains);
+int node_should_start(int nodeid, cluster_member_list_t *membership,
+	      	      char *rg_name, fod_t **domains);
+int node_domain_set(fod_t **domains, char *name, int **ret,
+		    int *retlen, int *flags);
+int node_domain_set_safe(char *domainname, int **ret, int *retlen, int *flags);
+ 
+#endif
diff --git a/rgmanager/src/daemons/fo_domain.c b/rgmanager/src/daemons/fo_domain.c
index d1e53a1..54c082c 100644
--- a/rgmanager/src/daemons/fo_domain.c
+++ b/rgmanager/src/daemons/fo_domain.c
@@ -36,7 +36,7 @@
  */
 int group_property(char *, char *, char *, size_t);
 
-fod_node_t *
+static fod_node_t *
 #ifndef NO_CCS
 fod_get_node(int ccsfd, char *base, int idx, fod_t *domain)
 #else
@@ -102,7 +102,7 @@ fod_get_node(int __attribute__((unused)) ccsfd, char *base, int idx, fod_t *doma
 }
 
 
-fod_t *
+static fod_t *
 fod_get_domain(int ccsfd, char *base, int idx, fod_t **domains)
 {
 	fod_t *fod;
@@ -203,22 +203,6 @@ construct_domains(int ccsfd, fod_t **domains)
 }
 
 
-fod_t *
-fod_find_domain(fod_t **domains, char *name)
-{
-	fod_t *dom;
-	
-	list_do(domains, dom) {
-		
-		if (!strcasecmp(dom->fd_name, name))
-			return dom;
-	
-	} while (!list_done(domains,dom));
-	
-	return NULL;
-}
-
-
 void
 deconstruct_domains(fod_t **domains)
 {
@@ -288,7 +272,7 @@ print_domains(fod_t **domains)
  *				2 for Yes, Not lowest-ordered, online member.
  *				3 for Yes, Lowest-ordered, online member.
  */
-int
+static int
 node_in_domain(char *nodename, fod_t *domain,
 	       cluster_member_list_t *membership)
 {
@@ -454,7 +438,7 @@ node_should_start(int nodeid, cluster_member_list_t *membership,
 	nodename = memb_id_to_name(membership, nodeid);
 
 #ifndef NO_CCS /* XXX Testing only */
-	if (group_property(rg_name, "domain",
+	if (group_property(rg_name, (char *)"domain",
 			    domainname, sizeof(domainname))) {
 		/*
 		 * If no domain is present, then the node in question should


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]