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