Skip to content

Commit 72da7a6

Browse files
committed
Auto merge of #2237 - asomers:MNT_, r=JohnTitor
Add more MNT_ flags, especially on FreeBSD
2 parents c4767aa + 0100b37 commit 72da7a6

File tree

4 files changed

+31
-11
lines changed

4 files changed

+31
-11
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,18 +3358,10 @@ pub const DLT_LOOP: ::c_uint = 108;
33583358
pub const BPF_ALIGNMENT: ::c_int = 4;
33593359

33603360
// sys/mount.h
3361-
pub const MNT_RDONLY: ::c_int = 0x00000001;
3362-
pub const MNT_SYNCHRONOUS: ::c_int = 0x00000002;
3363-
pub const MNT_NOEXEC: ::c_int = 0x00000004;
3364-
pub const MNT_NOSUID: ::c_int = 0x00000008;
33653361
pub const MNT_NODEV: ::c_int = 0x00000010;
33663362
pub const MNT_UNION: ::c_int = 0x00000020;
3367-
pub const MNT_ASYNC: ::c_int = 0x00000040;
33683363
pub const MNT_CPROTECT: ::c_int = 0x00000080;
33693364

3370-
// NFS export related mount flags.
3371-
pub const MNT_EXPORTED: ::c_int = 0x00000100;
3372-
33733365
// MAC labeled / "quarantined" flag
33743366
pub const MNT_QUARANTINE: ::c_int = 0x00000400;
33753367

@@ -3390,9 +3382,7 @@ pub const MNT_NOATIME: ::c_int = 0x10000000;
33903382
pub const MNT_SNAPSHOT: ::c_int = 0x40000000;
33913383

33923384
// External filesystem command modifier flags.
3393-
pub const MNT_UPDATE: ::c_int = 0x00010000;
33943385
pub const MNT_NOBLOCK: ::c_int = 0x00020000;
3395-
pub const MNT_RELOAD: ::c_int = 0x00040000;
33963386

33973387
// sys/spawn.h:
33983388
pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x01;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,16 @@ pub const JAIL_SYS_DISABLE: ::c_int = 0;
712712
pub const JAIL_SYS_NEW: ::c_int = 1;
713713
pub const JAIL_SYS_INHERIT: ::c_int = 2;
714714

715+
pub const MNT_ACLS: ::c_int = 0x08000000;
716+
pub const MNT_BYFSID: ::c_int = 0x08000000;
717+
pub const MNT_GJOURNAL: ::c_int = 0x02000000;
718+
pub const MNT_MULTILABEL: ::c_int = 0x04000000;
719+
pub const MNT_NFS4ACLS: ::c_int = 0x00000010;
720+
pub const MNT_SNAPSHOT: ::c_int = 0x01000000;
721+
pub const MNT_UNION: ::c_int = 0x00000020;
722+
pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
723+
pub const MNT_NONBUSY: ::c_int = 0x04000000;
724+
715725
pub const SO_BINTIME: ::c_int = 0x2000;
716726
pub const SO_NO_OFFLOAD: ::c_int = 0x4000;
717727
pub const SO_NO_DDP: ::c_int = 0x8000;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,18 @@ pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
592592
pub const MCL_CURRENT: ::c_int = 0x0001;
593593
pub const MCL_FUTURE: ::c_int = 0x0002;
594594

595+
pub const MNT_NOATIME: ::c_int = 0x10000000;
596+
pub const MNT_NOCLUSTERR: ::c_int = 0x40000000;
597+
pub const MNT_NOCLUSTERW: ::c_int = 0x80000000;
598+
pub const MNT_NOSYMFOLLOW: ::c_int = 0x00400000;
599+
pub const MNT_SOFTDEP: ::c_int = 0x00200000;
600+
pub const MNT_SUIDDIR: ::c_int = 0x00100000;
601+
pub const MNT_EXRDONLY: ::c_int = 0x00000080;
602+
pub const MNT_DEFEXPORTED: ::c_int = 0x00000200;
603+
pub const MNT_EXPORTANON: ::c_int = 0x00000400;
604+
pub const MNT_EXKERB: ::c_int = 0x00000800;
605+
pub const MNT_DELEXPORT: ::c_int = 0x00020000;
606+
595607
pub const MS_SYNC: ::c_int = 0x0000;
596608
pub const MS_ASYNC: ::c_int = 0x0001;
597609
pub const MS_INVALIDATE: ::c_int = 0x0002;

src/unix/bsd/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,15 @@ pub const F_RDLCK: ::c_short = 1;
337337
pub const F_UNLCK: ::c_short = 2;
338338
pub const F_WRLCK: ::c_short = 3;
339339

340-
pub const MNT_FORCE: ::c_int = 0x80000;
340+
pub const MNT_RDONLY: ::c_int = 0x00000001;
341+
pub const MNT_SYNCHRONOUS: ::c_int = 0x00000002;
342+
pub const MNT_NOEXEC: ::c_int = 0x00000004;
343+
pub const MNT_NOSUID: ::c_int = 0x00000008;
344+
pub const MNT_ASYNC: ::c_int = 0x00000040;
345+
pub const MNT_EXPORTED: ::c_int = 0x00000100;
346+
pub const MNT_UPDATE: ::c_int = 0x00010000;
347+
pub const MNT_RELOAD: ::c_int = 0x00040000;
348+
pub const MNT_FORCE: ::c_int = 0x00080000;
341349

342350
pub const Q_SYNC: ::c_int = 0x600;
343351
pub const Q_QUOTAON: ::c_int = 0x100;

0 commit comments

Comments
 (0)