summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/preen.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-07-20 08:50:54 +0000
committerphk <phk@FreeBSD.org>1999-07-20 08:50:54 +0000
commitcf4a7fab742bfd88596615a4e608783600af67b5 (patch)
tree4844e04e95faff3b0656353de6fc09867f4b6c4b /sbin/fsck_ffs/preen.c
parent9450c7816fd0981ffb314b111c937876988e4f96 (diff)
downloadFreeBSD-src-cf4a7fab742bfd88596615a4e608783600af67b5.zip
FreeBSD-src-cf4a7fab742bfd88596615a4e608783600af67b5.tar.gz
Also check against chardevs when looking for root.
Diffstat (limited to 'sbin/fsck_ffs/preen.c')
-rw-r--r--sbin/fsck_ffs/preen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/fsck_ffs/preen.c b/sbin/fsck_ffs/preen.c
index cc8bba6..ffae2c6 100644
--- a/sbin/fsck_ffs/preen.c
+++ b/sbin/fsck_ffs/preen.c
@@ -36,7 +36,7 @@
static const char sccsid[] = "@(#)preen.c 8.5 (Berkeley) 4/28/95";
#endif
static const char rcsid[] =
- "$Id: preen.c,v 1.9 1998/06/15 07:07:20 charnier Exp $";
+ "$Id: preen.c,v 1.11 1998/12/03 02:41:11 julian Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -320,6 +320,8 @@ retry:
return (origname);
}
if ((stchar.st_mode & S_IFMT) == S_IFCHR) {
+ if (stslash.st_dev == stchar.st_rdev)
+ hotroot++;
return (raw);
} else {
printf("%s is not a character device\n", raw);
OpenPOWER on IntegriCloud