diff options
author | josht@us.ibm.com <josht@us.ibm.com> | 2005-08-23 00:28:50 +0100 |
---|---|---|
committer | josht@us.ibm.com <josht@us.ibm.com> | 2005-08-23 00:28:50 +0100 |
commit | 43c5c358f0d94471f22b830ad9b804bda21d1c80 (patch) | |
tree | 4cefe87725521e6ad4222c6dada557e29307a1ea /tools/xenstat | |
parent | 6f39427729912dc41dc15b826c038142b4112188 (diff) | |
download | xen-43c5c358f0d94471f22b830ad9b804bda21d1c80.tar.gz xen-43c5c358f0d94471f22b830ad9b804bda21d1c80.tar.bz2 xen-43c5c358f0d94471f22b830ad9b804bda21d1c80.zip |
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.
Diffstat (limited to 'tools/xenstat')
-rw-r--r-- | tools/xenstat/libxenstat/src/xenstat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c index e37ba9c25a..85ffc0872d 100644 --- a/tools/xenstat/libxenstat/src/xenstat.c +++ b/tools/xenstat/libxenstat/src/xenstat.c @@ -505,7 +505,7 @@ static int xenstat_collect_networks(xenstat_handle * handle, 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, |