ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/statgrab/statgrab.c
(Generate patch)

Comparing projects/libstatgrab/src/statgrab/statgrab.c (file contents):
Revision 1.19 by ats, Fri Feb 13 15:13:37 2004 UTC vs.
Revision 1.20 by ats, Sat Feb 14 00:06:00 2004 UTC

# Line 38 | Line 38 | typedef enum {
38          DOUBLE,
39          STRING,
40          INT,
41 +        BOOL,
42          DUPLEX
43   } stat_type;
44  
# Line 374 | Line 375 | void populate_net() {
375  
376                          add_stat(INT, &iface[i].speed,
377                                   "net", name, "speed", NULL);
378 +                        add_stat(BOOL, &iface[i].up,
379 +                                 "net", name, "up", NULL);
380                          add_stat(DUPLEX, &iface[i].dup,
381                                   "net", name, "duplex", NULL);
382                  }
# Line 473 | Line 476 | void print_stat_value(const stat *s) {
476                  break;
477          case INT:
478                  printf("%d", *(int *)v);
479 +                break;
480 +        case BOOL:
481 +                printf("%s", *(int *)v ? "true" : "false");
482                  break;
483          case DUPLEX:
484                  switch (*(statgrab_duplex *) v) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines