From 473ee77f29e9f8dbb3a550493566c1e742a03897 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 23 Dec 1999 14:44:36 +0000 Subject: [PATCH] Fix the fixfsfile() so that it works for both block and character devices as root. This could fix the "filesystem still dirty after fsck" problem. Submitted by: bde --- lib/libc/gen/fstab.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 65b02c190665..5962fe23fe5f 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -32,7 +32,12 @@ */ #if defined(LIBC_SCCS) && !defined(lint) +#if 0 static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93"; +#else +static char rcsid[] = + "$FreeBSD$"; +#endif #endif /* LIBC_SCCS and not lint */ #include @@ -71,7 +76,8 @@ fixfsfile() else strcpy(buf, _PATH_DEV); strcat(buf, sf.f_mntfromname); - if (stat(buf, &sb) != 0 || !S_ISBLK(sb.st_mode)) + if (stat(buf, &sb) != 0 || + (!S_ISBLK(sb.st_mode) && !S_ISCHR(sb.st_mode))) return; _fs_fstab.fs_spec = buf; }