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 |
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 |
|
} |
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 |
|
} |