From 870fec3b7b48712b88c2c8b3ebb05613b186cdd3 Mon Sep 17 00:00:00 2001 From: reinelt Date: Sun, 25 Jan 2004 05:30:09 +0000 Subject: [lcd4linux @ 2004-01-25 05:30:08 by reinelt] plugin_netdev for parsing /proc/net/dev added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@338 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- plugin_proc_stat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugin_proc_stat.c') diff --git a/plugin_proc_stat.c b/plugin_proc_stat.c index 26cc8a9..37d7c85 100644 --- a/plugin_proc_stat.c +++ b/plugin_proc_stat.c @@ -1,4 +1,4 @@ -/* $Id: plugin_proc_stat.c,v 1.10 2004/01/22 08:55:30 reinelt Exp $ +/* $Id: plugin_proc_stat.c,v 1.11 2004/01/25 05:30:09 reinelt Exp $ * * plugin for /proc/stat parsing * @@ -23,6 +23,9 @@ * * * $Log: plugin_proc_stat.c,v $ + * Revision 1.11 2004/01/25 05:30:09 reinelt + * plugin_netdev for parsing /proc/net/dev added + * * Revision 1.10 2004/01/22 08:55:30 reinelt * fixed unhandled kernel-2.6 entries in /prco/stat * @@ -125,7 +128,8 @@ static int parse_proc_stat (void) while (!feof(stream)) { char buffer[1024]; - if (fgets (buffer, sizeof(buffer), stream) ==NULL) break; + if (fgets (buffer, sizeof(buffer), stream) == NULL) break; + if (strncmp(buffer, "cpu", 3)==0) { char *cpu; cpu=strtok(buffer, " \t\n"); -- cgit v1.2.3