public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: master - libcman: Return normal error codes Date: Wed, 24 Jun 2009 14:34:00 -0000 [thread overview] Message-ID: <20090624143352.C7AEF120263@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ecf3d8c8331110f783ce064eefe4a9e278d38755 Commit: ecf3d8c8331110f783ce064eefe4a9e278d38755 Parent: a977cbca172502b5d25e8d2ed915a2e39266f17c Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Wed Jun 24 15:32:55 2009 +0100 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Wed Jun 24 15:32:55 2009 +0100 libcman: Return normal error codes Although the code in libcman looks like a corosync library in places it should still return unix-standard error codes, not CS_ ones. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/services/cman/lib/libcman.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cman/services/cman/lib/libcman.c b/cman/services/cman/lib/libcman.c index 13c09c4..aed5626 100644 --- a/cman/services/cman/lib/libcman.c +++ b/cman/services/cman/lib/libcman.c @@ -757,7 +757,8 @@ int cman_dispatch ( dispatch_types != CS_DISPATCH_ALL && dispatch_types != CS_DISPATCH_BLOCKING) { - return (CS_ERR_INVALID_PARAM); + errno = EINVAL; + return -1; } cman_inst = (struct cman_inst *)handle; @@ -787,9 +788,10 @@ int cman_dispatch ( } if (dispatch_avail == -1) { if (cman_inst->finalize == 1) { - error = CS_OK; + error = 0; } else { - error = CS_ERR_LIBRARY; + errno = EINVAL; + error = -1; } goto error_put; } @@ -814,7 +816,8 @@ int cman_dispatch ( break; default: - error = CS_ERR_LIBRARY; + error = -1; + errno = EINVAL; goto error_put; break; } @@ -954,7 +957,8 @@ int cman_set_version(cman_handle_t handle, const cman_version_t *version) } if (confdb_reload(confdb_handle, 0, error, sizeof(error)) != CS_OK) { - ret = EINVAL; + errno = EINVAL; + ret = -1; } confdb_finalize(confdb_handle);
reply other threads:[~2009-06-24 14:34 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=20090624143352.C7AEF120263@lists.fedorahosted.org \ --to=chrissie@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).