diff options
Diffstat (limited to 'lib/libc/gen/fstab.c')
| -rw-r--r-- | lib/libc/gen/fstab.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 65b02c1906658..a5260687149a3 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -35,13 +35,8 @@ static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ -#include <sys/param.h> -#include <sys/mount.h> -#include <sys/stat.h> - #include <errno.h> #include <fstab.h> -#include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -52,30 +47,8 @@ static struct fstab _fs_fstab; static int LineNo = 0; static void error __P((int)); -static void fixfsfile __P((void)); static int fstabscan __P((void)); -static void -fixfsfile() -{ - static char buf[sizeof(_PATH_DEV) + MNAMELEN]; - struct stat sb; - struct statfs sf; - - if (strcmp(_fs_fstab.fs_file, "/") != 0) - return; - if (statfs("/", &sf) != 0) - return; - if (sf.f_mntfromname[0] == '/') - buf[0] = '\0'; - else - strcpy(buf, _PATH_DEV); - strcat(buf, sf.f_mntfromname); - if (stat(buf, &sb) != 0 || !S_ISBLK(sb.st_mode)) - return; - _fs_fstab.fs_spec = buf; -} - static int fstabscan() { @@ -96,7 +69,6 @@ fstabscan() if (!strpbrk(p, " \t")) { _fs_fstab.fs_spec = strsep(&p, ":\n"); _fs_fstab.fs_file = strsep(&p, ":\n"); - fixfsfile(); _fs_fstab.fs_type = strsep(&p, ":\n"); if (_fs_fstab.fs_type) { if (!strcmp(_fs_fstab.fs_type, FSTAB_XX)) @@ -124,7 +96,6 @@ fstabscan() while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; _fs_fstab.fs_file = cp; - fixfsfile(); while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; _fs_fstab.fs_vfstype = cp; |
