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 |
< |
errf("Failed to close file (%m)"); |
159 |
< |
return NULL; |
160 |
< |
} |
158 |
> |
endmntent(f); |
159 |
|
|
160 |
|
#endif |
161 |
|
#ifdef FREEBSD |