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

Comparing projects/libstatgrab/src/libstatgrab/disk_stats.c (file contents):
Revision 1.44 by pajs, Fri Jan 9 10:06:01 2004 UTC vs.
Revision 1.45 by ats, Fri Jan 9 12:32:36 2004 UTC

# Line 576 | Line 576 | diskio_stat_t *get_diskio_stats(int *entries){
576                  n++;
577          }
578  
579 <        if(f != NULL) fclose(f);
579 >        fclose(f);
580  
581        /* This code relies on /proc/partions existing, and it all being malloc'ed above.
582
581          if (!has_pp_stats) {
582 <                /* This is an older kernel without stats in /proc/partitions.
583 <                   Read what we can from /proc/stat instead. */
582 >                /* This is an older kernel where /proc/partitions doesn't
583 >                   contain stats. Read what we can from /proc/stat instead, and
584 >                   fill in the appropriate bits of the list allocated above. */
585  
586                  f = fopen("/proc/stat", "r");
587                  if (f == NULL) goto out;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines