CVSROOT:        /cvs/cluster
Module name:    cluster
Changes by:     [EMAIL PROTECTED]       2007-10-11 05:10:50

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&r1=1.11&r2=1.12

--- cluster/ccs/lib/libccs.c    2007/10/08 16:43:21     1.11
+++ cluster/ccs/lib/libccs.c    2007/10/11 05:10:49     1.12
@@ -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);

Reply via email to