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] Add a newline to the fscanf format string used to parse

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add a newline to the fscanf format string used to parse /proc/net/dev entries, to avoid an additional read and bad-entry-skip just to eat the newline.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Aug 2005 19:28:13 +0000
Delivery-date: Wed, 24 Aug 2005 09:08:12 +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 josht@xxxxxxxxxx
# Node ID 63cc61fafb2806eddeb3c5455d2d2cbe9aad47d3
# Parent  f26884f4e6f18a3c45012fa4ea359eeb10cc2acf
Add a newline to the fscanf format string used to parse /proc/net/dev entries, 
to avoid an additional read and bad-entry-skip just to eat the newline.

diff -r f26884f4e6f1 -r 63cc61fafb28 tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Mon Aug 22 23:28:43 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Mon Aug 22 23:28:50 2005
@@ -505,7 +505,7 @@
                unsigned int domid;
                int ret = fscanf(handle->procnetdev,
                                 "vif%u.%u:%llu%llu%llu%llu%*u%*u%*u%*u"
-                                "%llu%llu%llu%llu%*u%*u%*u%*u",
+                                "%llu%llu%llu%llu%*u%*u%*u%*u\n",
                                 &domid, &net.id,
                                 &net.tbytes, &net.tpackets, &net.terrs,
                                 &net.tdrop,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add a newline to the fscanf format string used to parse /proc/net/dev entries, to avoid an additional read and bad-entry-skip just to eat the newline., Xen patchbot -unstable <=