Skip to content

Commit c53bec4

Browse files
committed
Delete FreeBSD's MNTK_ constants
These are only for the kernel's internal use and aren't exposed to userland. They also aren't stable across versions, and may be changed or deleted at any time. For example, by freebsd/freebsd-src@4dcdf39
1 parent ec4f56f commit c53bec4

File tree

2 files changed

+3
-73
lines changed

2 files changed

+3
-73
lines changed

libc-test/build.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,31 +2134,18 @@ fn test_freebsd(target: &str) {
21342134
"PS_FST_TYPE_EVENTFD" if Some(13) > freebsd_ver => true,
21352135

21362136
// Added in FreeBSD 14.
2137-
"MNT_RECURSE"
2138-
| "MNT_DEFERRED"
2139-
| "MNTK_RECURSE"
2140-
| "MNTK_UPPER_WAITER"
2141-
| "MNTK_TASKQUEUE_WAITER"
2142-
if Some(14) > freebsd_ver =>
2143-
{
2144-
true
2145-
}
2137+
"MNT_RECURSE" | "MNT_DEFERRED" if Some(14) > freebsd_ver => true,
21462138

21472139
// Added in FreeBSD 13.
21482140
"MNT_EXTLS" | "MNT_EXTLSCERT" | "MNT_EXTLSCERTUSER" | "MNT_NOCOVER"
2149-
| "MNT_EMPTYDIR" | "MNTK_NOMSYNC" | "MNTK_UNIONFS" | "MNTK_FPLOOKUP"
2150-
| "MNTK_SUSPEND_ALL"
2141+
| "MNT_EMPTYDIR"
21512142
if Some(13) > freebsd_ver =>
21522143
{
21532144
true
21542145
}
21552146

21562147
// Added in FreeBSD 12.
2157-
"MNT_UNTRUSTED" | "MNT_VERIFIED" | "MNTK_TEXT_REFS" | "MNTK_VMSETSIZE_BUG"
2158-
if Some(12) > freebsd_ver =>
2159-
{
2160-
true
2161-
}
2148+
"MNT_UNTRUSTED" | "MNT_VERIFIED" if Some(12) > freebsd_ver => true,
21622149

21632150
// Added in FreeBSD 14.
21642151
"PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" if Some(14) > freebsd_ver => true,

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3497,63 +3497,6 @@ pub const MNT_RECURSE: u64 = 0x100000000000;
34973497
/// Unmount in async context.
34983498
pub const MNT_DEFERRED: u64 = 0x200000000000;
34993499

3500-
/// Forced unmount in progress.
3501-
pub const MNTK_UNMOUNTF: u32 = 0x00000001;
3502-
/// Filtered async flag.
3503-
pub const MNTK_ASYNC: u32 = 0x00000002;
3504-
/// Async disabled by softdep.
3505-
pub const MNTK_SOFTDEP: u32 = 0x00000004;
3506-
/// Don't do msync.
3507-
pub const MNTK_NOMSYNC: u32 = 0x00000008;
3508-
/// Lock draining is happening.
3509-
pub const MNTK_DRAINING: u32 = 0x00000010;
3510-
/// Refcount expiring is happening.
3511-
pub const MNTK_REFEXPIRE: u32 = 0x00000020;
3512-
/// Allow shared locking for more ops.
3513-
pub const MNTK_EXTENDED_SHARED: u32 = 0x00000040;
3514-
/// Allow shared locking for writes.
3515-
pub const MNTK_SHARED_WRITES: u32 = 0x00000080;
3516-
/// Disallow page faults during reads and writes. Filesystem shall properly handle i/o
3517-
/// state on EFAULT.
3518-
pub const MNTK_NO_IOPF: u32 = 0x00000100;
3519-
/// Pending recursive unmount.
3520-
pub const MNTK_RECURSE: u32 = 0x00000200;
3521-
/// Waiting to drain MNTK_UPPER_PENDING.
3522-
pub const MNTK_UPPER_WAITER: u32 = 0x00000400;
3523-
pub const MNTK_LOOKUP_EXCL_DOTDOT: u32 = 0x00000800;
3524-
pub const MNTK_UNMAPPED_BUFS: u32 = 0x00002000;
3525-
/// FS uses the buffer cache.
3526-
pub const MNTK_USES_BCACHE: u32 = 0x00004000;
3527-
/// Keep use ref for text.
3528-
pub const MNTK_TEXT_REFS: u32 = 0x00008000;
3529-
pub const MNTK_VMSETSIZE_BUG: u32 = 0x00010000;
3530-
/// A hack for F_ISUNIONSTACK.
3531-
pub const MNTK_UNIONFS: u32 = 0x00020000;
3532-
/// fast path lookup is supported.
3533-
pub const MNTK_FPLOOKUP: u32 = 0x00040000;
3534-
/// Suspended by all-fs suspension.
3535-
pub const MNTK_SUSPEND_ALL: u32 = 0x00080000;
3536-
/// Waiting on unmount taskqueue.
3537-
pub const MNTK_TASKQUEUE_WAITER: u32 = 0x00100000;
3538-
/// Disable async.
3539-
pub const MNTK_NOASYNC: u32 = 0x00800000;
3540-
/// Unmount in progress.
3541-
pub const MNTK_UNMOUNT: u32 = 0x01000000;
3542-
/// Waiting for unmount to finish.
3543-
pub const MNTK_MWAIT: u32 = 0x02000000;
3544-
/// Request write suspension.
3545-
pub const MNTK_SUSPEND: u32 = 0x08000000;
3546-
/// Block secondary writes.
3547-
pub const MNTK_SUSPEND2: u32 = 0x04000000;
3548-
/// Write operations are suspended.
3549-
pub const MNTK_SUSPENDED: u32 = 0x10000000;
3550-
/// auto disable cache for nullfs mounts over this fs.
3551-
pub const MNTK_NULL_NOCACHE: u32 = 0x20000000;
3552-
/// FS supports shared lock lookups.
3553-
pub const MNTK_LOOKUP_SHARED: u32 = 0x40000000;
3554-
/// Don't send KNOTEs from VOP hooks.
3555-
pub const MNTK_NOKNOTE: u32 = 0x80000000;
3556-
35573500
/// Get configured filesystems.
35583501
pub const VFS_VFSCONF: ::c_int = 0;
35593502
/// Generic filesystem information.

0 commit comments

Comments
 (0)