public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: rgmanager: master - rgmanager: Fix fo_domain.c build warnings Date: Mon, 22 Jun 2009 16:55:00 -0000 [thread overview] Message-ID: <20090622165404.5E76F1201D4@lists.fedorahosted.org> (raw) 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
reply other threads:[~2009-06-22 16:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090622165404.5E76F1201D4@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).