summaryrefslogtreecommitdiff
path: root/libc/misc/statfs/internal_statvfs.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-13 11:35:31 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-13 11:35:31 +0000
commit3c84ded68a9106ac87886e173e75dd3dde33c231 (patch)
treedcc90d017e2c77b98d3753d470adfa576d36149c /libc/misc/statfs/internal_statvfs.c
parent4d668e00b8c42aca5662f1d65496a97a507f583f (diff)
Convert internal users of chmod/*stat*, minimize change for __strsep
Diffstat (limited to 'libc/misc/statfs/internal_statvfs.c')
-rw-r--r--libc/misc/statfs/internal_statvfs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libc/misc/statfs/internal_statvfs.c b/libc/misc/statfs/internal_statvfs.c
index 4e25edc3f..d41c3052d 100644
--- a/libc/misc/statfs/internal_statvfs.c
+++ b/libc/misc/statfs/internal_statvfs.c
@@ -18,12 +18,18 @@
02111-1307 USA. */
extern FILE *__setmntent (__const char *__file, __const char *__mode) __THROW attribute_hidden;
+
extern struct mntent *__getmntent_r (FILE *__restrict __stream,
struct mntent *__restrict __result,
char *__restrict __buffer,
int __bufsize) __THROW attribute_hidden;
+
extern int __endmntent (FILE *__stream) __THROW attribute_hidden;
+extern char *__strsep (char **__restrict __stringp,
+ __const char *__restrict __delim)
+ __THROW __nonnull ((1, 2)) attribute_hidden;
+
/* Now fill in the fields we have information for. */
buf->f_bsize = fsbuf.f_bsize;
/* Linux does not support f_frsize, so set it to the full block size. */
@@ -77,7 +83,7 @@ extern int __endmntent (FILE *__stream) __THROW attribute_hidden;
struct stat fsst;
/* Find out about the device the current entry is for. */
- if (stat (mntbuf.mnt_dir, &fsst) >= 0
+ if (__stat (mntbuf.mnt_dir, &fsst) >= 0
&& st.st_dev == fsst.st_dev)
{
/* Bingo, we found the entry for the device FD is on.
@@ -85,7 +91,7 @@ extern int __endmntent (FILE *__stream) __THROW attribute_hidden;
char *cp = mntbuf.mnt_opts;
char *opt;
- while ((opt = strsep (&cp, ",")) != NULL)
+ while ((opt = __strsep (&cp, ",")) != NULL)
if (__strcmp (opt, "ro") == 0)
buf->f_flag |= ST_RDONLY;
else if (__strcmp (opt, "nosuid") == 0)