cluster: master - cmanquorum: return CS_ERR codes
Christine Caulfield
chrissie@fedoraproject.org
Tue Jan 20 11:34:00 GMT 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0f256a3461c7d8d9c30821cb867727aff829ba34
Commit: 0f256a3461c7d8d9c30821cb867727aff829ba34
Parent: cb8f019ea31adcce8f9c552f3d2df0ca59ae5b68
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Tue Jan 20 11:33:11 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Tue Jan 20 11:33:11 2009 +0000
cmanquorum: return CS_ERR codes
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/services/quorum/services/cmanquorum.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cman/services/quorum/services/cmanquorum.c b/cman/services/quorum/services/cmanquorum.c
index 100c535..630af5a 100644
--- a/cman/services/quorum/services/cmanquorum.c
+++ b/cman/services/quorum/services/cmanquorum.c
@@ -1178,7 +1178,7 @@ static void message_handler_req_lib_cmanquorum_setexpected (void *conn, void *me
* to bypass them by fiddling with expected votes.
*/
if (quorum_flags & CMANQUORUM_FLAG_FEATURE_DISALLOWED && have_disallowed()) {
- error = -EINVAL;
+ error = CS_ERR_EXIST;
goto error_exit;
}
@@ -1186,7 +1186,7 @@ static void message_handler_req_lib_cmanquorum_setexpected (void *conn, void *me
newquorum = calculate_quorum(1, req_lib_cmanquorum_setexpected->expected_votes, &total_votes);
if (newquorum < total_votes / 2
|| newquorum > total_votes) {
- error = -EINVAL;
+ error = CS_ERR_INVALID_PARAM;
goto error_exit;
}
@@ -1216,7 +1216,7 @@ static void message_handler_req_lib_cmanquorum_setvotes (void *conn, void *messa
node = find_node_by_nodeid(req_lib_cmanquorum_setvotes->nodeid);
if (!node) {
- error = -EINVAL;
+ error = CS_ERR_NAME_NOT_FOUND;
goto error_exit;
}
@@ -1228,7 +1228,7 @@ static void message_handler_req_lib_cmanquorum_setvotes (void *conn, void *messa
if (newquorum < total_votes / 2 || newquorum > total_votes) {
node->votes = saved_votes;
- error = -EINVAL;
+ error = CS_ERR_INVALID_PARAM;
goto error_exit;
}
More information about the Cluster-cvs
mailing list