Skip to content

Commit cc19b6f

Browse files
committed
Auto merge of #2973 - asomers:MNT_bsd, r=JohnTitor
Add more MNT_ flags on {Dragonfly,Net,Open}BSD
2 parents a59c842 + 8acaac5 commit cc19b6f

File tree

9 files changed

+93
-2
lines changed

9 files changed

+93
-2
lines changed

libc-test/semver/dragonfly.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,16 @@ MINCORE_REFERENCED
622622
MINCORE_REFERENCED_OTHER
623623
MINCORE_SUPER
624624
MINSEC
625+
MNT_AUTOMOUNTED
626+
MNT_EXPUBLIC
625627
MNT_FORCE
628+
MNT_IGNORE
629+
MNT_LOCAL
630+
MNT_NODEV
631+
MNT_QUOTA
632+
MNT_ROOTFS
633+
MNT_TRIM
634+
MNT_USER
626635
MOD_CLKA
627636
MOD_CLKB
628637
MOD_ESTERROR
@@ -1536,4 +1545,4 @@ vmspace
15361545
wait4
15371546
waitid
15381547
xucred
1539-
eaccess
1548+
eaccess

libc-test/semver/netbsd.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,25 @@ MCL_CURRENT
645645
MCL_FUTURE
646646
MDMBUF
647647
MINSEC
648+
MNT_ACLS
649+
MNT_AUTOMOUNTED
650+
MNT_DISCARD
651+
MNT_EXTATTR
648652
MNT_FORCE
653+
MNT_IGNORE
654+
MNT_LOCAL
655+
MNT_LOG
656+
MNT_NFS4ACLS
657+
MNT_NOATIME
658+
MNT_NOCOREDUMP
659+
MNT_NODEV
660+
MNT_NODEVMTIME
661+
MNT_POSIX1EACLS
662+
MNT_QUOTA
663+
MNT_RELATIME
664+
MNT_SOFTDEP
665+
MNT_SYMPERM
666+
MNT_UNION
649667
MOD_CLKA
650668
MOD_CLKB
651669
MOD_ESTERROR

libc-test/semver/openbsd.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,23 @@ MCL_CURRENT
484484
MCL_FUTURE
485485
MDMBUF
486486
MINSIGSTKSZ
487+
MNT_DEFEXPORTED
488+
MNT_DELEXPORT
489+
MNT_DOOMED
490+
MNT_EXPORTANON
491+
MNT_EXRDONLY
487492
MNT_FORCE
493+
MNT_LOCAL
494+
MNT_NOATIME
495+
MNT_NODEV
496+
MNT_NOPERM
497+
MNT_QUOTA
498+
MNT_ROOTFS
499+
MNT_SOFTDEP
500+
MNT_STALLED
501+
MNT_SWAPPABLE
502+
MNT_WANTRDWR
503+
MNT_WXALLOWED
488504
MON_1
489505
MON_10
490506
MON_11

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,16 @@ pub const MSG_FBLOCKING: ::c_int = 0x00010000;
14091409
pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
14101410
pub const MSG_FMASK: ::c_int = 0xFFFF0000;
14111411

1412+
// sys/mount.h
1413+
pub const MNT_NODEV: ::c_int = 0x00000010;
1414+
pub const MNT_AUTOMOUNTED: ::c_int = 0x00000020;
1415+
pub const MNT_TRIM: ::c_int = 0x01000000;
1416+
pub const MNT_LOCAL: ::c_int = 0x00001000;
1417+
pub const MNT_QUOTA: ::c_int = 0x00002000;
1418+
pub const MNT_ROOTFS: ::c_int = 0x00004000;
1419+
pub const MNT_USER: ::c_int = 0x00008000;
1420+
pub const MNT_IGNORE: ::c_int = 0x00800000;
1421+
14121422
// utmpx entry types
14131423
pub const EMPTY: ::c_short = 0;
14141424
pub const RUN_LVL: ::c_short = 1;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2280,7 +2280,6 @@ pub const MNT_MULTILABEL: ::c_int = 0x04000000;
22802280
pub const MNT_NFS4ACLS: ::c_int = 0x00000010;
22812281
pub const MNT_SNAPSHOT: ::c_int = 0x01000000;
22822282
pub const MNT_UNION: ::c_int = 0x00000020;
2283-
pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
22842283
pub const MNT_NONBUSY: ::c_int = 0x04000000;
22852284

22862285
pub const SCM_CREDS2: ::c_int = 0x08;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
630630
pub const MCL_CURRENT: ::c_int = 0x0001;
631631
pub const MCL_FUTURE: ::c_int = 0x0002;
632632

633+
pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
633634
pub const MNT_NOATIME: ::c_int = 0x10000000;
634635
pub const MNT_NOCLUSTERR: ::c_int = 0x40000000;
635636
pub const MNT_NOCLUSTERW: ::c_int = 0x80000000;

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ pub const MADV_WILLNEED: ::c_int = 3;
419419
pub const MADV_DONTNEED: ::c_int = 4;
420420
pub const MADV_FREE: ::c_int = 6;
421421

422+
// sys/fstypes.h in NetBSD, or sys/mount.h in OpenBSD
423+
pub const MNT_NODEV: ::c_int = 0x00000010;
424+
pub const MNT_LOCAL: ::c_int = 0x00001000;
425+
pub const MNT_QUOTA: ::c_int = 0x00002000;
426+
422427
pub const AF_UNSPEC: ::c_int = 0;
423428
pub const AF_LOCAL: ::c_int = 1;
424429
pub const AF_UNIX: ::c_int = AF_LOCAL;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,23 @@ pub const BIOCSDLT: ::c_ulong = 0x80044278;
17851785
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
17861786
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
17871787

1788+
// <sys/fstypes.h>
1789+
pub const MNT_UNION: ::c_int = 0x00000020;
1790+
pub const MNT_NOCOREDUMP: ::c_int = 0x00008000;
1791+
pub const MNT_RELATIME: ::c_int = 0x00020000;
1792+
pub const MNT_IGNORE: ::c_int = 0x00100000;
1793+
pub const MNT_NFS4ACLS: ::c_int = 0x00200000;
1794+
pub const MNT_DISCARD: ::c_int = 0x00800000;
1795+
pub const MNT_EXTATTR: ::c_int = 0x01000000;
1796+
pub const MNT_LOG: ::c_int = 0x02000000;
1797+
pub const MNT_NOATIME: ::c_int = 0x04000000;
1798+
pub const MNT_AUTOMOUNTED: ::c_int = 0x10000000;
1799+
pub const MNT_SYMPERM: ::c_int = 0x20000000;
1800+
pub const MNT_NODEVMTIME: ::c_int = 0x40000000;
1801+
pub const MNT_SOFTDEP: ::c_int = 0x80000000;
1802+
pub const MNT_POSIX1EACLS: ::c_int = 0x00000800;
1803+
pub const MNT_ACLS: ::c_int = MNT_POSIX1EACLS;
1804+
17881805
//<sys/timex.h>
17891806
pub const NTP_API: ::c_int = 4;
17901807
pub const MAXPHASE: ::c_long = 500000000;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,22 @@ pub const SF_ARCHIVED: ::c_uint = 0x00010000;
16391639
pub const SF_IMMUTABLE: ::c_uint = 0x00020000;
16401640
pub const SF_APPEND: ::c_uint = 0x00040000;
16411641

1642+
// sys/mount.h
1643+
pub const MNT_NOPERM: ::c_int = 0x00000020;
1644+
pub const MNT_WXALLOWED: ::c_int = 0x00000800;
1645+
pub const MNT_EXRDONLY: ::c_int = 0x00000080;
1646+
pub const MNT_DEFEXPORTED: ::c_int = 0x00000200;
1647+
pub const MNT_EXPORTANON: ::c_int = 0x00000400;
1648+
pub const MNT_ROOTFS: ::c_int = 0x00004000;
1649+
pub const MNT_NOATIME: ::c_int = 0x00008000;
1650+
pub const MNT_DELEXPORT: ::c_int = 0x00020000;
1651+
pub const MNT_STALLED: ::c_int = 0x00100000;
1652+
pub const MNT_SWAPPABLE: ::c_int = 0x00200000;
1653+
pub const MNT_WANTRDWR: ::c_int = 0x02000000;
1654+
pub const MNT_SOFTDEP: ::c_int = 0x04000000;
1655+
pub const MNT_DOOMED: ::c_int = 0x08000000;
1656+
1657+
// For use with vfs_fsync and getfsstat
16421658
pub const MNT_WAIT: ::c_int = 1;
16431659
pub const MNT_NOWAIT: ::c_int = 2;
16441660
pub const MNT_LAZY: ::c_int = 3;

0 commit comments

Comments
 (0)