public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* rgmanager: master - rgmanager: Fix fo_domain.c build warnings
@ 2009-06-22 16:55 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-06-22 16:55 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/rgmanager.git?p=rgmanager.git;a=commitdiff;h=63299b87a55c511f805319b8115a80aced2d12bb
Commit:        63299b87a55c511f805319b8115a80aced2d12bb
Parent:        02aefe711e88622bd7fa53b5ff8d834859cb2cf3
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 12:51:19 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-22 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 16:55 rgmanager: master - rgmanager: Fix fo_domain.c build warnings Lon Hohberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).