diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-07 02:32:27 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-07 02:32:27 +0000 |
| commit | e523bd15353350c3480b8a1820a0944b0fa8212e (patch) | |
| tree | 60485116f9c62c306bb753f12f9d4eb79d16aa4e /libc/misc/statfs/internal_statvfs.c | |
| parent | 3b3434516a3415d7e0f4e1d50c553876dcb337b2 (diff) | |
| download | uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.bz2 uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.xz | |
Big fricking merge from trunk.
Diffstat (limited to 'libc/misc/statfs/internal_statvfs.c')
| -rw-r--r-- | libc/misc/statfs/internal_statvfs.c | 10 |
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) |
