From 8bfe10cb45d6ba7c3e756dcfaac6e54afb1e0bf4 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Sun, 15 Jul 2018 10:45:24 +0200 Subject: Add MODULE_INIT_ constants These are flags required to implement the linux kernel loading mechanism. Specifically finit_module. --- src/unix/notbsd/android/mod.rs | 4 ++++ src/unix/notbsd/linux/mod.rs | 4 ++++ 2 files changed, 8 insertions(+) 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() { -- cgit v1.2.1