Skip to content

Commit 8bfe10c

Browse files
committed
Add MODULE_INIT_ constants
These are flags required to implement the linux kernel loading mechanism. Specifically finit_module.
1 parent 5ac35c8 commit 8bfe10c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/unix/notbsd/android/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,10 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962;
14581458
pub const SIOCGIFMAP: ::c_ulong = 0x00008970;
14591459
pub const SIOCSIFMAP: ::c_ulong = 0x00008971;
14601460

1461+
// linux/module.h
1462+
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
1463+
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;
1464+
14611465
// Similarity to Linux it's not used but defined for compatibility.
14621466
pub const ENOATTR: ::c_int = ::ENODATA;
14631467

src/unix/notbsd/linux/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,10 @@ pub const ARPD_LOOKUP: ::c_ushort = 0x02;
14981498
pub const ARPD_FLUSH: ::c_ushort = 0x03;
14991499
pub const ATF_MAGIC: ::c_int = 0x80;
15001500

1501+
// linux/module.h
1502+
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
1503+
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;
1504+
15011505
f! {
15021506
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
15031507
for slot in cpuset.bits.iter_mut() {

0 commit comments

Comments
 (0)