summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-09 22:21:10 +0000
committerphk <phk@FreeBSD.org>2004-11-09 22:21:10 +0000
commit37ad4f1923f750790407861ce00a1e96c5f1b0be (patch)
treea0898a9eb72f91239f4c43f21404a108a77b4bc4 /sys/fs/nullfs
parent921930c5854fc8118d129cc5be63eb03148ece00 (diff)
downloadFreeBSD-src-37ad4f1923f750790407861ce00a1e96c5f1b0be.zip
FreeBSD-src-37ad4f1923f750790407861ce00a1e96c5f1b0be.tar.gz
Refuse attempts to mount root filesystem
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r--sys/fs/nullfs/null_vfsops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index ea49163..d834d04 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -85,6 +85,8 @@ nullfs_mount(struct mount *mp, struct thread *td)
NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp);
+ if (mp->mnt_flag & MNT_ROOTFS)
+ return (EOPNOTSUPP);
/*
* Update is a no-op
*/
OpenPOWER on IntegriCloud