cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/ccs/lib libccs.c
Date: 11 Oct 2007 05:11:26 -0000	[thread overview]
Message-ID: <20071011051126.711.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2007-10-11 05:11:26

Modified files:
	ccs/lib        : libccs.c 

Log message:
	E2BIG is more appropriate than ENOSPC here

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.10.2.1&r2=1.10.2.2

--- cluster/ccs/lib/libccs.c	2007/10/08 20:29:00	1.10.2.1
+++ cluster/ccs/lib/libccs.c	2007/10/11 05:11:26	1.10.2.2
@@ -658,7 +658,7 @@
 	ret = snprintf(path, sizeof(path),
 			"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name", nodename);
 	if (ret < 0 || (size_t) ret >= sizeof(path))
-		return (-ENOSPC);
+		return (-E2BIG);
 
 	str = NULL;
 	error = ccs_get(cd, path, &str);
@@ -668,7 +668,7 @@
 	}
 
 	if (nodename_len >= sizeof(host_only))
-		return (-ENOSPC);
+		return (-E2BIG);
 
 	/* Try just the hostname */
 	strcpy(host_only, nodename);
@@ -680,7 +680,7 @@
 				"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name",
 				host_only);
 		if (ret < 0 || (size_t) ret >= sizeof(path))
-			return (-ENOSPC);
+			return (-E2BIG);
 
 		str = NULL;
 		error = ccs_get(cd, path, &str);
@@ -733,14 +733,14 @@
 			if (altcnt == 0) {
 				if (strlen(str) >= sizeof(canonical_name)) {
 					free(str);
-					return (-ENOSPC);
+					return (-E2BIG);
 				}
 				strcpy(canonical_name, str);
 			}
 
 			if (strlen(str) >= sizeof(cur_node)) {
 				free(str);
-				return (-ENOSPC);
+				return (-E2BIG);
 			}
 
 			strcpy(cur_node, str);



             reply	other threads:[~2007-10-11  5:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  5:11 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-21 22:31 [Cluster-devel] cluster/ccs/lib libccs.c jbrassow
2007-11-14 16:51 lhh
2007-10-26 19:18 rmccabe
2007-10-11  5:10 rmccabe

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=20071011051126.711.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /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: link
Be 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 NNTP newsgroup(s).