Signed-off-by: Angus Salkeld <[email protected]>
---
lib/evs.c | 24 ++++++++++++------------
lib/pload.c | 4 ++--
lib/quorum.c | 5 +----
lib/votequorum.c | 48 ++++++++++++++++++++++++------------------------
4 files changed, 39 insertions(+), 42 deletions(-)
diff --git a/lib/evs.c b/lib/evs.c
index cc5f604..5b0e515 100644
--- a/lib/evs.c
+++ b/lib/evs.c
@@ -103,7 +103,7 @@ evs_error_t evs_initialize (
evs_inst->c = qb_ipcc_connect ("evs", IPC_REQUEST_SIZE);
if (evs_inst->c == NULL) {
- error = errno_to_cs(-errno);
+ error = qb_to_cs_error(-errno);
goto error_put_destroy;
}
if (error != EVS_OK) {
@@ -242,7 +242,7 @@ evs_error_t evs_dispatch (
dispatch_data = (struct qb_ipc_response_header *)dispatch_buf;
do {
- error = errno_to_cs (qb_ipcc_event_recv (
+ error = qb_to_cs_error(qb_ipcc_event_recv (
evs_inst->c,
dispatch_buf,
IPC_DISPATCH_SIZE,
@@ -349,8 +349,8 @@ evs_error_t evs_join (
iov[1].iov_base = (void*) groups; /* cast away const */
iov[1].iov_len = (group_entries * sizeof (struct evs_group));
- error = qb_ipcc_sendv_recv (evs_inst->c, iov, 2,
- &res_lib_evs_join, sizeof (struct res_lib_evs_join));
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov, 2,
+ &res_lib_evs_join, sizeof (struct res_lib_evs_join)));
if (error != CS_OK) {
goto error_exit;
@@ -390,8 +390,8 @@ evs_error_t evs_leave (
iov[1].iov_base = (void *) groups; /* cast away const */
iov[1].iov_len = (group_entries * sizeof (struct evs_group));
- error = qb_ipcc_sendv_recv (evs_inst->c, iov, 2,
- &res_lib_evs_leave, sizeof (struct res_lib_evs_leave));
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov, 2,
+ &res_lib_evs_leave, sizeof (struct res_lib_evs_leave)));
if (error != CS_OK) {
goto error_exit;
@@ -439,10 +439,10 @@ evs_error_t evs_mcast_joined (
iov[0].iov_len = sizeof (struct req_lib_evs_mcast_joined);
memcpy (&iov[1], iovec, iov_len * sizeof (struct iovec));
- error = qb_ipcc_sendv_recv (evs_inst->c, iov,
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov,
iov_len + 1,
&res_lib_evs_mcast_joined,
- sizeof (struct res_lib_evs_mcast_joined));
+ sizeof (struct res_lib_evs_mcast_joined)));
if (error != CS_OK) {
goto error_exit;
@@ -492,10 +492,10 @@ evs_error_t evs_mcast_groups (
iov[1].iov_len = (group_entries * sizeof (struct evs_group));
memcpy (&iov[2], iovec, iov_len * sizeof (struct iovec));
- error = qb_ipcc_sendv_recv (evs_inst->c, iov,
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c, iov,
iov_len + 2,
&res_lib_evs_mcast_groups,
- sizeof (struct res_lib_evs_mcast_groups));
+ sizeof (struct res_lib_evs_mcast_groups)));
if (error != CS_OK) {
goto error_exit;
@@ -532,11 +532,11 @@ evs_error_t evs_membership_get (
iov.iov_base = (void *)&req_lib_evs_membership_get;
iov.iov_len = sizeof (struct req_lib_evs_membership_get);
- error = qb_ipcc_sendv_recv (evs_inst->c,
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (evs_inst->c,
&iov,
1,
&res_lib_evs_membership_get,
- sizeof (struct res_lib_evs_membership_get));
+ sizeof (struct res_lib_evs_membership_get)));
if (error != CS_OK) {
goto error_exit;
diff --git a/lib/pload.c b/lib/pload.c
index e133dc9..e874ad2 100644
--- a/lib/pload.c
+++ b/lib/pload.c
@@ -181,11 +181,11 @@ unsigned int pload_start (
iov.iov_base = (char *)&req_lib_pload_start;
iov.iov_len = sizeof (struct req_lib_pload_start);
- error = qb_ipcc_sendv_recv(pload_inst->c,
+ error = qb_to_cs_error(qb_ipcc_sendv_recv(pload_inst->c,
&iov,
1,
&res_lib_pload_start,
- sizeof (struct res_lib_pload_start));
+ sizeof (struct res_lib_pload_start)));
if (error != CS_OK) {
goto error_exit;
diff --git a/lib/quorum.c b/lib/quorum.c
index 5dc8c67..a030e1c 100644
--- a/lib/quorum.c
+++ b/lib/quorum.c
@@ -86,9 +86,6 @@ cs_error_t quorum_initialize (
error = errno_to_cs(-errno);
goto error_put_destroy;
}
- if (error != CS_OK) {
- goto error_put_destroy;
- }
if (callbacks)
memcpy(&quorum_inst->callbacks, callbacks, sizeof (callbacks));
@@ -191,7 +188,7 @@ cs_error_t quorum_fd_get (
return (error);
}
- error = qb_ipcc_fd_get (quorum_inst->c, fd);
+ error = qb_to_cs_error(qb_ipcc_fd_get (quorum_inst->c, fd));
(void)hdb_handle_put (&quorum_handle_t_db, handle);
diff --git a/lib/votequorum.c b/lib/votequorum.c
index 470d318..505703d 100644
--- a/lib/votequorum.c
+++ b/lib/votequorum.c
@@ -85,7 +85,7 @@ cs_error_t votequorum_initialize (
votequorum_inst->c = qb_ipcc_connect ("votequorum", IPC_REQUEST_SIZE);
if (votequorum_inst->c == NULL) {
- error = errno_to_cs(-errno);
+ error = qb_to_cs_error(-errno);
goto error_put_destroy;
}
if (error != CS_OK) {
@@ -163,12 +163,12 @@ cs_error_t votequorum_getinfo (
iov.iov_base = (char *)&req_lib_votequorum_getinfo;
iov.iov_len = sizeof (struct req_lib_votequorum_getinfo);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_getinfo,
- sizeof (struct res_lib_votequorum_getinfo));
+ sizeof (struct res_lib_votequorum_getinfo)));
if (error != CS_OK) {
goto error_exit;
@@ -213,12 +213,12 @@ cs_error_t votequorum_setexpected (
iov.iov_base = (char *)&req_lib_votequorum_setexpected;
iov.iov_len = sizeof (struct req_lib_votequorum_setexpected);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -256,12 +256,12 @@ cs_error_t votequorum_setvotes (
iov.iov_base = (char *)&req_lib_votequorum_setvotes;
iov.iov_len = sizeof (struct req_lib_votequorum_setvotes);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -303,12 +303,12 @@ cs_error_t votequorum_qdisk_register (
iov.iov_base = (char *)&req_lib_votequorum_qdisk_register;
iov.iov_len = sizeof (struct req_lib_votequorum_qdisk_register);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -345,12 +345,12 @@ cs_error_t votequorum_qdisk_poll (
iov.iov_base = (char *)&req_lib_votequorum_qdisk_poll;
iov.iov_len = sizeof (struct req_lib_votequorum_qdisk_poll);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -384,12 +384,12 @@ cs_error_t votequorum_qdisk_unregister (
iov.iov_base = (char *)&req_lib_votequorum_general;
iov.iov_len = sizeof (struct req_lib_votequorum_general);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -427,12 +427,12 @@ cs_error_t votequorum_qdisk_getinfo (
iov.iov_base = (char *)&req_lib_votequorum_general;
iov.iov_len = sizeof (struct req_lib_votequorum_general);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_qdisk_getinfo,
- sizeof (struct res_lib_votequorum_qdisk_getinfo));
+ sizeof (struct res_lib_votequorum_qdisk_getinfo)));
if (error != CS_OK) {
goto error_exit;
@@ -471,12 +471,12 @@ cs_error_t votequorum_setstate (
iov.iov_base = (char *)&req_lib_votequorum_general;
iov.iov_len = sizeof (struct req_lib_votequorum_general);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -511,12 +511,12 @@ cs_error_t votequorum_leaving (
iov.iov_base = (char *)&req_lib_votequorum_general;
iov.iov_len = sizeof (struct req_lib_votequorum_general);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -554,12 +554,12 @@ cs_error_t votequorum_trackstart (
iov.iov_base = (char *)&req_lib_votequorum_trackstart;
iov.iov_len = sizeof (struct req_lib_votequorum_trackstart);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -593,12 +593,12 @@ cs_error_t votequorum_trackstop (
iov.iov_base = (char *)&req_lib_votequorum_general;
iov.iov_len = sizeof (struct req_lib_votequorum_general);
- error = qb_ipcc_sendv_recv (
+ error = qb_to_cs_error(qb_ipcc_sendv_recv (
votequorum_inst->c,
&iov,
1,
&res_lib_votequorum_status,
- sizeof (struct res_lib_votequorum_status));
+ sizeof (struct res_lib_votequorum_status)));
if (error != CS_OK) {
goto error_exit;
@@ -664,7 +664,7 @@ cs_error_t votequorum_fd_get (
return (error);
}
- error = qb_ipcc_fd_get (votequorum_inst->c, fd);
+ error = qb_to_cs_error(qb_ipcc_fd_get (votequorum_inst->c, fd));
(void)hdb_handle_put (&votequorum_handle_t_db, handle);
--
1.7.3.1
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais