--- projects/libstatgrab/src/statgrab/statgrab.c 2004/02/13 15:13:37 1.19 +++ projects/libstatgrab/src/statgrab/statgrab.c 2004/02/14 00:06:00 1.20 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: statgrab.c,v 1.19 2004/02/13 15:13:37 ats Exp $ + * $Id: statgrab.c,v 1.20 2004/02/14 00:06:00 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -38,6 +38,7 @@ typedef enum { DOUBLE, STRING, INT, + BOOL, DUPLEX } stat_type; @@ -374,6 +375,8 @@ void populate_net() { add_stat(INT, &iface[i].speed, "net", name, "speed", NULL); + add_stat(BOOL, &iface[i].up, + "net", name, "up", NULL); add_stat(DUPLEX, &iface[i].dup, "net", name, "duplex", NULL); } @@ -473,6 +476,9 @@ void print_stat_value(const stat *s) { break; case INT: printf("%d", *(int *)v); + break; + case BOOL: + printf("%s", *(int *)v ? "true" : "false"); break; case DUPLEX: switch (*(statgrab_duplex *) v) {