From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx> those are all info flags.. it's redudant and inconsistent Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx> --- :100644 100644 0ee692e... c92274e... M exec/votequorum.c :100644 100644 e31c2ad... b3213b9... M include/corosync/ipc_votequorum.h :100644 100644 6483171... de4d55c... M include/corosync/votequorum.h :100644 100644 20dbda2... e02d8a9... M man/votequorum_getinfo.3.in :100644 100644 7b0a94f... 15a62c0... M test/testvotequorum1.c :100644 100644 fb9ecf4... 456963c... M tools/corosync-quorumtool.c exec/votequorum.c | 4 ++-- include/corosync/ipc_votequorum.h | 4 ++-- include/corosync/votequorum.h | 4 ++-- man/votequorum_getinfo.3.in | 4 ++-- test/testvotequorum1.c | 8 ++++---- tools/corosync-quorumtool.c | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/exec/votequorum.c b/exec/votequorum.c index 0ee692e..c92274e 100644 --- a/exec/votequorum.c +++ b/exec/votequorum.c @@ -2013,10 +2013,10 @@ static void message_handler_req_lib_votequorum_getinfo (void *conn, const void * res_lib_votequorum_getinfo.nodeid = node->node_id; if (two_node) { - res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_FLAG_TWONODE; + res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_TWONODE; } if (cluster_is_quorate) { - res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_FLAG_QUORATE; + res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_QUORATE; } if (wait_for_all) { res_lib_votequorum_getinfo.flags |= VOTEQUORUM_INFO_WAIT_FOR_ALL; diff --git a/include/corosync/ipc_votequorum.h b/include/corosync/ipc_votequorum.h index e31c2ad..b3213b9 100644 --- a/include/corosync/ipc_votequorum.h +++ b/include/corosync/ipc_votequorum.h @@ -117,8 +117,8 @@ struct res_lib_votequorum_status { struct qb_ipc_response_header header __attribute__((aligned(8))); }; -#define VOTEQUORUM_INFO_FLAG_TWONODE 1 -#define VOTEQUORUM_INFO_FLAG_QUORATE 2 +#define VOTEQUORUM_INFO_TWONODE 1 +#define VOTEQUORUM_INFO_QUORATE 2 #define VOTEQUORUM_INFO_WAIT_FOR_ALL 4 #define VOTEQUORUM_INFO_LAST_MAN_STANDING 8 #define VOTEQUORUM_INFO_AUTO_TIE_BREAKER 16 diff --git a/include/corosync/votequorum.h b/include/corosync/votequorum.h index 6483171..de4d55c 100644 --- a/include/corosync/votequorum.h +++ b/include/corosync/votequorum.h @@ -42,8 +42,8 @@ extern "C" { typedef uint64_t votequorum_handle_t; -#define VOTEQUORUM_INFO_FLAG_TWONODE 1 -#define VOTEQUORUM_INFO_FLAG_QUORATE 2 +#define VOTEQUORUM_INFO_TWONODE 1 +#define VOTEQUORUM_INFO_QUORATE 2 #define VOTEQUORUM_INFO_WAIT_FOR_ALL 4 #define VOTEQUORUM_INFO_LAST_MAN_STANDING 8 #define VOTEQUORUM_INFO_AUTO_TIE_BREAKER 16 diff --git a/man/votequorum_getinfo.3.in b/man/votequorum_getinfo.3.in index 20dbda2..e02d8a9 100644 --- a/man/votequorum_getinfo.3.in +++ b/man/votequorum_getinfo.3.in @@ -74,8 +74,8 @@ The node_state is defined as: The flags are defined as: .nf -#define VOTEQUORUM_INFO_FLAG_TWONODE 1 -#define VOTEQUORUM_INFO_FLAG_QUORATE 2 +#define VOTEQUORUM_INFO_TWONODE 1 +#define VOTEQUORUM_INFO_QUORATE 2 #define VOTEQUORUM_INFO_WAIT_FOR_ALL 4 #define VOTEQUORUM_INFO_LAST_MAN_STANDING 8 #define VOTEQUORUM_INFO_AUTO_TIE_BREAKER 16 diff --git a/test/testvotequorum1.c b/test/testvotequorum1.c index 7b0a94f..15a62c0 100644 --- a/test/testvotequorum1.c +++ b/test/testvotequorum1.c @@ -122,8 +122,8 @@ int main(int argc, char *argv[]) printf("total votes %d\n", info.total_votes); printf("quorum %d\n", info.quorum); printf("flags "); - if (info.flags & VOTEQUORUM_INFO_FLAG_TWONODE) printf("2Node "); - if (info.flags & VOTEQUORUM_INFO_FLAG_QUORATE) printf("Quorate "); + if (info.flags & VOTEQUORUM_INFO_TWONODE) printf("2Node "); + if (info.flags & VOTEQUORUM_INFO_QUORATE) printf("Quorate "); if (info.flags & VOTEQUORUM_INFO_WAIT_FOR_ALL) printf("WaitForAll "); if (info.flags & VOTEQUORUM_INFO_LAST_MAN_STANDING) printf("LastManStanding "); if (info.flags & VOTEQUORUM_INFO_AUTO_TIE_BREAKER) printf("AutoTieBreaker "); @@ -152,8 +152,8 @@ int main(int argc, char *argv[]) printf("total votes %d\n", info.total_votes); printf("votequorum %d\n", info.quorum); printf("flags "); - if (info.flags & VOTEQUORUM_INFO_FLAG_TWONODE) printf("2Node "); - if (info.flags & VOTEQUORUM_INFO_FLAG_QUORATE) printf("Quorate "); + if (info.flags & VOTEQUORUM_INFO_TWONODE) printf("2Node "); + if (info.flags & VOTEQUORUM_INFO_QUORATE) printf("Quorate "); if (info.flags & VOTEQUORUM_INFO_WAIT_FOR_ALL) printf("WaitForAll "); if (info.flags & VOTEQUORUM_INFO_LAST_MAN_STANDING) printf("LastManStanding "); if (info.flags & VOTEQUORUM_INFO_AUTO_TIE_BREAKER) printf("AutoTieBreaker "); diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c index fb9ecf4..456963c 100644 --- a/tools/corosync-quorumtool.c +++ b/tools/corosync-quorumtool.c @@ -426,10 +426,10 @@ static int display_quorum_data(int is_quorate, uint32_t nodeid, printf("Expected votes: %d\n", info.node_expected_votes); printf("Highest expected: %d\n", info.highest_expected); printf("Total votes: %d\n", info.total_votes); - printf("Quorum: %d %s\n", info.quorum, info.flags & VOTEQUORUM_INFO_FLAG_QUORATE?" ":"Activity blocked"); + printf("Quorum: %d %s\n", info.quorum, info.flags & VOTEQUORUM_INFO_QUORATE?" ":"Activity blocked"); printf("Flags: "); - if (info.flags & VOTEQUORUM_INFO_FLAG_TWONODE) printf("2Node "); - if (info.flags & VOTEQUORUM_INFO_FLAG_QUORATE) printf("Quorate "); + if (info.flags & VOTEQUORUM_INFO_TWONODE) printf("2Node "); + if (info.flags & VOTEQUORUM_INFO_QUORATE) printf("Quorate "); if (info.flags & VOTEQUORUM_INFO_WAIT_FOR_ALL) printf("WaitForAll "); if (info.flags & VOTEQUORUM_INFO_LAST_MAN_STANDING) printf("LastManStanding "); if (info.flags & VOTEQUORUM_INFO_AUTO_TIE_BREAKER) printf("AutoTieBreaker "); -- 1.7.7.6 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss