diff options
author | phk <phk@FreeBSD.org> | 2004-11-09 22:21:10 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-11-09 22:21:10 +0000 |
commit | 37ad4f1923f750790407861ce00a1e96c5f1b0be (patch) | |
tree | a0898a9eb72f91239f4c43f21404a108a77b4bc4 /sys/fs/nullfs/null_vfsops.c | |
parent | 921930c5854fc8118d129cc5be63eb03148ece00 (diff) | |
download | FreeBSD-src-37ad4f1923f750790407861ce00a1e96c5f1b0be.zip FreeBSD-src-37ad4f1923f750790407861ce00a1e96c5f1b0be.tar.gz |
Refuse attempts to mount root filesystem
Diffstat (limited to 'sys/fs/nullfs/null_vfsops.c')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 2 |
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 */ |