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

[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.



# 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


 


Rackspace

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