From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx> Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx> --- :100644 100644 b633ece... eee7e3c... M include/corosync/ipc_votequorum.h :100644 100644 76676ee... 09bb949... M include/corosync/votequorum.h :100644 100644 e2b578f... 37ed0a4... M lib/votequorum.c :100644 100644 560f8ca... b58d8ee... M test/testvotequorum2.c :100644 100644 c9e8de0... 0d461ab... M tools/corosync-quorumtool.c include/corosync/ipc_votequorum.h | 5 +---- include/corosync/votequorum.h | 5 ----- lib/votequorum.c | 3 --- test/testvotequorum2.c | 6 ------ tools/corosync-quorumtool.c | 11 ----------- 5 files changed, 1 insertions(+), 29 deletions(-) diff --git a/include/corosync/ipc_votequorum.h b/include/corosync/ipc_votequorum.h index b633ece..eee7e3c 100644 --- a/include/corosync/ipc_votequorum.h +++ b/include/corosync/ipc_votequorum.h @@ -43,15 +43,12 @@ enum req_votequorum_types { MESSAGE_REQ_VOTEQUORUM_SETEXPECTED, MESSAGE_REQ_VOTEQUORUM_SETVOTES, MESSAGE_REQ_VOTEQUORUM_TRACKSTART, - MESSAGE_REQ_VOTEQUORUM_TRACKSTOP -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API - , + MESSAGE_REQ_VOTEQUORUM_TRACKSTOP, MESSAGE_REQ_VOTEQUORUM_QDEVICE_REGISTER, MESSAGE_REQ_VOTEQUORUM_QDEVICE_UNREGISTER, MESSAGE_REQ_VOTEQUORUM_QDEVICE_UPDATE, MESSAGE_REQ_VOTEQUORUM_QDEVICE_POLL, MESSAGE_REQ_VOTEQUORUM_QDEVICE_GETINFO -#endif }; enum res_votequorum_types { diff --git a/include/corosync/votequorum.h b/include/corosync/votequorum.h index 76676ee..09bb949 100644 --- a/include/corosync/votequorum.h +++ b/include/corosync/votequorum.h @@ -70,13 +70,11 @@ struct votequorum_info { unsigned int flags; }; -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API struct votequorum_qdevice_info { unsigned int votes; unsigned int state; char name[VOTEQUORUM_MAX_QDEVICE_NAME_LEN]; }; -#endif typedef struct { uint32_t nodeid; @@ -177,7 +175,6 @@ cs_error_t votequorum_context_set ( votequorum_handle_t handle, void *context); -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API /** * Register a quorum device * @@ -218,8 +215,6 @@ cs_error_t votequorum_qdevice_getinfo ( unsigned int nodeid, struct votequorum_qdevice_info *info); -#endif - #ifdef __cplusplus } #endif diff --git a/lib/votequorum.c b/lib/votequorum.c index e2b578f..37ed0a4 100644 --- a/lib/votequorum.c +++ b/lib/votequorum.c @@ -550,7 +550,6 @@ error_put: return (error); } -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API cs_error_t votequorum_qdevice_register ( votequorum_handle_t handle, const char *name) @@ -735,5 +734,3 @@ error_exit: return (error); } -#endif - diff --git a/test/testvotequorum2.c b/test/testvotequorum2.c index 560f8ca..b58d8ee 100644 --- a/test/testvotequorum2.c +++ b/test/testvotequorum2.c @@ -42,7 +42,6 @@ #include <corosync/corotypes.h> #include <corosync/votequorum.h> -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API static votequorum_handle_t handle; static void print_info(int ok_to_fail) @@ -59,12 +58,10 @@ static void print_info(int ok_to_fail) printf("\n"); } } -#endif int main(int argc, char *argv[]) { int ret = 0; -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API int pollcount=0, polltime=1; int err; @@ -109,8 +106,5 @@ int main(int argc, char *argv[]) out: votequorum_finalize(handle); -#else - fprintf(stderr, "qdevice support is not built in corosync/votequorum\n"); -#endif return ret; } diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c index c9e8de0..0d461ab 100644 --- a/tools/corosync-quorumtool.c +++ b/tools/corosync-quorumtool.c @@ -135,9 +135,7 @@ static void show_usage(const char *name) printf(" -e <expected> change expected votes for the cluster (*)\n"); printf(" -H show nodeids in hexadecimal rather than decimal\n"); printf(" -i show node IP addresses instead of the resolved name\n"); -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API printf(" -f forcefully unregister a quorum device *DANGEROUS* (*)\n"); -#endif printf(" -h show this help text\n"); printf(" -V show version and exit\n"); printf("\n"); @@ -342,7 +340,6 @@ static void display_nodes_data(uint32_t nodeid, nodeid_format_t nodeid_format, n g_view_list = NULL; } -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API if ((display_qdevice) && (v_handle)) { int err; struct votequorum_qdevice_info qinfo; @@ -360,7 +357,6 @@ static void display_nodes_data(uint32_t nodeid, nodeid_format_t nodeid_format, n printf("%s (%s)\n", qinfo.name, qinfo.state?"Voting":"Not voting"); } } -#endif } static const char *decode_state(int state) @@ -564,7 +560,6 @@ err_exit: static int unregister_qdevice(void) { -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API int err; struct votequorum_qdevice_info qinfo; @@ -580,10 +575,6 @@ static int unregister_qdevice(void) return -1; } return 0; -#else - fprintf(stderr, "votequorum quorum device support is not built-in\n"); - return -1; -#endif } /* @@ -674,7 +665,6 @@ int main (int argc, char *argv[]) { while ( (opt = getopt(argc, argv, options)) != -1 ) { switch (opt) { -#ifdef EXPERIMENTAL_QUORUM_DEVICE_API case 'f': if (using_votequorum() > 0) { command_opt = CMD_UNREGISTER_QDEVICE; @@ -683,7 +673,6 @@ int main (int argc, char *argv[]) { exit(2); } break; -#endif case 's': command_opt = CMD_SHOWSTATUS; break; -- 1.7.7.6 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss