[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Bugfix: xenstat_collect_networks now returns the correct error code.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 28ffa7296a44cd7f5a8ac6d71f66276f7a50a063
# Parent  9404574350ce3518052685cf5dd48c8aae415cf9
Bugfix: xenstat_collect_networks now returns the correct error code.
Signed-off-by: Josh Triplett <josht@xxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 9404574350ce -r 28ffa7296a44 tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Fri Aug 26 08:48:59 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Fri Aug 26 08:49:31 2005
@@ -493,20 +493,20 @@
                node->handle->procnetdev = fopen("/proc/net/dev", "r");
                if (node->handle->procnetdev == NULL) {
                        perror("Error opening /proc/net/dev");
-                       return 1;
+                       return 0;
                }
 
                /* Validate the format of /proc/net/dev */
                if (fread(header, sizeof(PROCNETDEV_HEADER) - 1, 1,
                          node->handle->procnetdev) != 1) {
                        perror("Error reading /proc/net/dev header");
-                       return 1;
+                       return 0;
                }
                header[sizeof(PROCNETDEV_HEADER) - 1] = '\0';
                if (strcmp(header, PROCNETDEV_HEADER) != 0) {
                        fprintf(stderr,
                                "Unexpected /proc/net/dev format\n");
-                       return 1;
+                       return 0;
                }
        }
 
@@ -558,7 +558,7 @@
                                    sizeof(xenstat_network));
                }
                if (domain->networks == NULL)
-                       return 1;
+                       return 0;
                domain->networks[domain->num_networks - 1] = net;
        }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.