Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more MNT_ flags on {Dragonfly,Net,Open}BSD #2973

Merged
merged 3 commits into from Oct 23, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/unix/bsd/freebsdlike/dragonfly/mod.rs
Expand Up @@ -1409,6 +1409,16 @@ pub const MSG_FBLOCKING: ::c_int = 0x00010000;
pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
pub const MSG_FMASK: ::c_int = 0xFFFF0000;

// sys/mount.h
pub const MNT_NODEV: ::c_int = 0x00000010;
pub const MNT_AUTOMOUNTED: ::c_int = 0x00000020;
pub const MNT_TRIM: ::c_int = 0x01000000;
pub const MNT_LOCAL: ::c_int = 0x00001000;
pub const MNT_QUOTA: ::c_int = 0x00002000;
pub const MNT_ROOTFS: ::c_int = 0x00004000;
pub const MNT_USER: ::c_int = 0x00008000;
pub const MNT_IGNORE: ::c_int = 0x00800000;

// utmpx entry types
pub const EMPTY: ::c_short = 0;
pub const RUN_LVL: ::c_short = 1;
Expand Down
1 change: 0 additions & 1 deletion src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -2280,7 +2280,6 @@ pub const MNT_MULTILABEL: ::c_int = 0x04000000;
pub const MNT_NFS4ACLS: ::c_int = 0x00000010;
pub const MNT_SNAPSHOT: ::c_int = 0x01000000;
pub const MNT_UNION: ::c_int = 0x00000020;
pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
pub const MNT_NONBUSY: ::c_int = 0x04000000;

pub const SCM_CREDS2: ::c_int = 0x08;
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Expand Up @@ -630,6 +630,7 @@ pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;

pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
pub const MNT_NOATIME: ::c_int = 0x10000000;
pub const MNT_NOCLUSTERR: ::c_int = 0x40000000;
pub const MNT_NOCLUSTERW: ::c_int = 0x80000000;
Expand Down
5 changes: 5 additions & 0 deletions src/unix/bsd/netbsdlike/mod.rs
Expand Up @@ -419,6 +419,11 @@ pub const MADV_WILLNEED: ::c_int = 3;
pub const MADV_DONTNEED: ::c_int = 4;
pub const MADV_FREE: ::c_int = 6;

// sys/fstypes.h in NetBSD, or sys/mount.h in OpenBSD
pub const MNT_NODEV: ::c_int = 0x00000010;
pub const MNT_LOCAL: ::c_int = 0x00001000;
pub const MNT_QUOTA: ::c_int = 0x00002000;

pub const AF_UNSPEC: ::c_int = 0;
pub const AF_LOCAL: ::c_int = 1;
pub const AF_UNIX: ::c_int = AF_LOCAL;
Expand Down
17 changes: 17 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -1785,6 +1785,23 @@ pub const BIOCSDLT: ::c_ulong = 0x80044278;
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;

// <sys/fstypes.h>
pub const MNT_UNION: ::c_int = 0x00000020;
pub const MNT_NOCOREDUMP: ::c_int = 0x00008000;
pub const MNT_RELATIME: ::c_int = 0x00020000;
pub const MNT_IGNORE: ::c_int = 0x00100000;
pub const MNT_NFS4ACLS: ::c_int = 0x00200000;
pub const MNT_DISCARD: ::c_int = 0x00800000;
pub const MNT_EXTATTR: ::c_int = 0x01000000;
pub const MNT_LOG: ::c_int = 0x02000000;
pub const MNT_NOATIME: ::c_int = 0x04000000;
pub const MNT_AUTOMOUNTED: ::c_int = 0x10000000;
pub const MNT_SYMPERM: ::c_int = 0x20000000;
pub const MNT_NODEVMTIME: ::c_int = 0x40000000;
pub const MNT_SOFTDEP: ::c_int = 0x80000000;
pub const MNT_POSIX1EACLS: ::c_int = 0x00000800;
pub const MNT_ACLS: ::c_int = MNT_POSIX1EACLS;

//<sys/timex.h>
pub const NTP_API: ::c_int = 4;
pub const MAXPHASE: ::c_long = 500000000;
Expand Down
16 changes: 16 additions & 0 deletions src/unix/bsd/netbsdlike/openbsd/mod.rs
Expand Up @@ -1639,6 +1639,22 @@ pub const SF_ARCHIVED: ::c_uint = 0x00010000;
pub const SF_IMMUTABLE: ::c_uint = 0x00020000;
pub const SF_APPEND: ::c_uint = 0x00040000;

// sys/mount.h
pub const MNT_NOPERM: ::c_int = 0x00000020;
pub const MNT_WXALLOWED: ::c_int = 0x00000800;
pub const MNT_EXRDONLY: ::c_int = 0x00000080;
pub const MNT_DEFEXPORTED: ::c_int = 0x00000200;
pub const MNT_EXPORTANON: ::c_int = 0x00000400;
pub const MNT_ROOTFS: ::c_int = 0x00004000;
pub const MNT_NOATIME: ::c_int = 0x00008000;
pub const MNT_DELEXPORT: ::c_int = 0x00020000;
pub const MNT_STALLED: ::c_int = 0x00100000;
pub const MNT_SWAPPABLE: ::c_int = 0x00200000;
pub const MNT_WANTRDWR: ::c_int = 0x02000000;
pub const MNT_SOFTDEP: ::c_int = 0x04000000;
pub const MNT_DOOMED: ::c_int = 0x08000000;

// For use with vfs_fsync and getfsstat
pub const MNT_WAIT: ::c_int = 1;
pub const MNT_NOWAIT: ::c_int = 2;
pub const MNT_LAZY: ::c_int = 3;
Expand Down