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.21 by ats, Wed Feb 18 17:29:15 2004 UTC vs.
Revision 1.23 by ats, Sun Apr 4 21:59:16 2004 UTC

# Line 363 | Line 363 | void populate_net() {
363                                   "net", name, "tx", NULL);
364                          add_stat(LONG_LONG, &net[i].rx,
365                                   "net", name, "rx", NULL);
366 +                        add_stat(LONG_LONG, &net[i].ipackets,
367 +                                 "net", name, "ipackets", NULL);
368 +                        add_stat(LONG_LONG, &net[i].opackets,
369 +                                 "net", name, "opackets", NULL);
370 +                        add_stat(LONG_LONG, &net[i].ierrors,
371 +                                 "net", name, "ierrors", NULL);
372 +                        add_stat(LONG_LONG, &net[i].oerrors,
373 +                                 "net", name, "oerrors", NULL);
374 +                        add_stat(LONG_LONG, &net[i].collisions,
375 +                                 "net", name, "collisions", NULL);
376                          add_stat(TIME_T, &net[i].systime,
377                                   "net", name, "systime", NULL);
378                  }
# Line 456 | Line 466 | void get_stats() {
466   /* Print the value of a stat. */
467   void print_stat_value(const stat *s) {
468          void *v = s->stat;
469 +        long l;
470  
471          switch (s->type) {
472          case LONG_LONG:
# Line 463 | Line 474 | void print_stat_value(const stat *s) {
474                  break;
475          case TIME_T:
476                  /* FIXME option for formatted time? */
477 <                printf("%ld", *(time_t *)v);
477 >                l = *(time_t *)v;
478 >                printf("%ld", l);
479                  break;
480          case FLOAT:
481                  printf("%f", *(float *)v);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines