CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: [EMAIL PROTECTED] 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/[EMAIL PROTECTED]"%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/[EMAIL
PROTECTED]"%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);