WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Bugfix: xenstat_collect_networks now returns the correct error code.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Aug 2005 08:52:11 +0000
Delivery-date: Fri, 26 Aug 2005 08:50:47 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Bugfix: xenstat_collect_networks now returns the correct error code., Xen patchbot -unstable <=