aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mount.h
diff options
context:
space:
mode:
authorSean Eric Fagan <sef@FreeBSD.org>2019-09-23 04:28:07 +0000
committerSean Eric Fagan <sef@FreeBSD.org>2019-09-23 04:28:07 +0000
commitba7a55d93465725fd860066d95d4e910c3c027c2 (patch)
treee46ac60f38cbac374d17571c2895139d8899b29b /sys/sys/mount.h
parent7505cffa56d7347436b32f8d3f192ad1c4383ad8 (diff)
downloadsrc-ba7a55d93465725fd860066d95d4e910c3c027c2.tar.gz
src-ba7a55d93465725fd860066d95d4e910c3c027c2.zip
Add two options to allow mount to avoid covering up existing mount points.
The two options are * nocover/cover: Prevent/allow mounting over an existing root mountpoint. E.g., "mount -t ufs -o nocover /dev/sd1a /usr/local" will fail if /usr/local is already a mountpoint. * emptydir/noemptydir: Prevent/allow mounting on a non-empty directory. E.g., "mount -t ufs -o emptydir /dev/sd1a /usr" will fail. Neither of these options is intended to be a default, for historical and compatibility reasons. Reviewed by: allanjude, kib Differential Revision: https://reviews.freebsd.org/D21458
Notes
Notes: svn path=/head/; revision=352614
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r--sys/sys/mount.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 562fa191fe24..4b60055ca6dd 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -373,9 +373,11 @@ void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *);
#define MNT_SNAPSHOT 0x0000000001000000ULL /* snapshot the filesystem */
#define MNT_NONBUSY 0x0000000004000000ULL /* check vnode use counts. */
#define MNT_BYFSID 0x0000000008000000ULL /* specify filesystem by ID. */
+#define MNT_NOCOVER 0x0000001000000000ULL /* Do not cover a mount point */
+#define MNT_EMPTYDIR 0x0000002000000000ULL /* Only mount on empty dir */
#define MNT_CMDFLAGS (MNT_UPDATE | MNT_DELEXPORT | MNT_RELOAD | \
MNT_FORCE | MNT_SNAPSHOT | MNT_NONBUSY | \
- MNT_BYFSID)
+ MNT_BYFSID | MNT_NOCOVER | MNT_EMPTYDIR)
/*
* Internal filesystem control flags stored in mnt_kern_flag.
*