summaryrefslogtreecommitdiffstats
path: root/sys/fs/hpfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-09 22:14:57 +0000
committerphk <phk@FreeBSD.org>2004-11-09 22:14:57 +0000
commit921930c5854fc8118d129cc5be63eb03148ece00 (patch)
treeefc6e619521fca3446f6d2dcc4eb791155c7b651 /sys/fs/hpfs
parentc6f350df370b418343158c6308fa6e6255dd7ae4 (diff)
downloadFreeBSD-src-921930c5854fc8118d129cc5be63eb03148ece00.zip
FreeBSD-src-921930c5854fc8118d129cc5be63eb03148ece00.tar.gz
Refuse attemps to mount root filesystem
Diffstat (limited to 'sys/fs/hpfs')
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 4b72606..4acf562 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -225,6 +225,8 @@ hpfs_mountfs(devvp, mp, argsp, td)
struct g_consumer *cp;
struct bufobj *bo;
+ if (mp->mnt_flag & MNT_ROOTFS)
+ return (EOPNOTSUPP);
dprintf(("hpfs_mountfs():\n"));
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
OpenPOWER on IntegriCloud