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
This commit is contained in:
parent
1671c412aa
commit
473ee77f29
@ -32,7 +32,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
#if 0
|
||||||
static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93";
|
||||||
|
#else
|
||||||
|
static char rcsid[] =
|
||||||
|
"$FreeBSD$";
|
||||||
|
#endif
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -71,7 +76,8 @@ fixfsfile()
|
|||||||
else
|
else
|
||||||
strcpy(buf, _PATH_DEV);
|
strcpy(buf, _PATH_DEV);
|
||||||
strcat(buf, sf.f_mntfromname);
|
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;
|
return;
|
||||||
_fs_fstab.fs_spec = buf;
|
_fs_fstab.fs_spec = buf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user