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.11 by tdb, Tue May 21 16:47:12 2002 UTC

# Line 1 | Line 1
1   /*
2   * i-scream central monitoring system
3 + * http://www.i-scream.org.uk
4   * Copyright (C) 2000-2002 i-scream
5   *
6   * This program is free software; you can redistribute it and/or
# Line 116 | Line 117 | char *get_disk_stats(){
117          }
118  
119   #endif
120 < #ifdef linux
121 <        if ((f=fopen("/etc/mtab", "r" ))==NULL){
120 > #ifdef LINUX
121 >        if ((f=setmntent("/etc/mtab", "r" ))==NULL){
122                  errf("Failed to open mounts (%m)");
123                  return NULL;
124          }
# Line 154 | Line 155 | char *get_disk_stats(){
155                  sd=sd_ptr;
156          }
157  
158 <        if ((fclose(f)) != 0) {
158 >        if ((endmntent(f)) != 0) {
159                  errf("Failed to close file (%m)");
160                  return NULL;
161          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines