diff options
author | Pascal Bach <pascal.bach@nextrem.ch> | 2018-07-15 10:45:24 +0200 |
---|---|---|
committer | Pascal Bach <pascal.bach@nextrem.ch> | 2018-07-17 18:41:48 +0200 |
commit | 8bfe10cb45d6ba7c3e756dcfaac6e54afb1e0bf4 (patch) | |
tree | 1166f4a2eee20582378472761e0427a6ad894575 | |
parent | 5ac35c85fe58fa177ef00d4216cf9aa86eae7c4e (diff) | |
download | rust-libc-8bfe10cb45d6ba7c3e756dcfaac6e54afb1e0bf4.tar.gz |
Add MODULE_INIT_ constants
These are flags required to implement the linux kernel loading mechanism.
Specifically finit_module.
-rw-r--r-- | src/unix/notbsd/android/mod.rs | 4 | ||||
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index 55adc5c8d6..3e10acd505 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -1458,6 +1458,10 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962; pub const SIOCGIFMAP: ::c_ulong = 0x00008970; pub const SIOCSIFMAP: ::c_ulong = 0x00008971; +// linux/module.h +pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001; +pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002; + // Similarity to Linux it's not used but defined for compatibility. pub const ENOATTR: ::c_int = ::ENODATA; diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index a71df7f575..e1e3503906 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -1498,6 +1498,10 @@ pub const ARPD_LOOKUP: ::c_ushort = 0x02; pub const ARPD_FLUSH: ::c_ushort = 0x03; pub const ATF_MAGIC: ::c_int = 0x80; +// linux/module.h +pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001; +pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002; + f! { pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { for slot in cpuset.bits.iter_mut() { |