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

Comparing projects/cms/source/ihost/libstatgrab/disk_stat.c (file contents):
Revision 1.9 by pajs, Sun May 19 20:54:10 2002 UTC vs.
Revision 1.10 by pajs, Tue May 21 16:16:41 2002 UTC

# Line 116 | Line 116 | char *get_disk_stats(){
116          }
117  
118   #endif
119 < #ifdef linux
120 <        if ((f=fopen("/etc/mtab", "r" ))==NULL){
119 > #ifdef LINUX
120 >        if ((f=setmntent("/etc/mtab", "r" ))==NULL){
121                  errf("Failed to open mounts (%m)");
122                  return NULL;
123          }
# Line 154 | Line 154 | char *get_disk_stats(){
154                  sd=sd_ptr;
155          }
156  
157 <        if ((fclose(f)) != 0) {
157 >        if ((endmntent(f)) != 0) {
158                  errf("Failed to close file (%m)");
159                  return NULL;
160          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines