# | 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) { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |