Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,7 @@ fn test_android(target: &str) {
"linux/if_link.h",
"linux/rtnetlink.h",
"linux/if_tun.h",
"linux/kexec.h",
"linux/magic.h",
"linux/membarrier.h",
"linux/memfd.h",
Expand Down Expand Up @@ -3250,6 +3251,7 @@ fn test_linux(target: &str) {
"linux/if_tun.h",
"linux/input.h",
"linux/ipv6.h",
"linux/kexec.h",
"linux/keyctl.h",
"linux/magic.h",
"linux/memfd.h",
Expand Down Expand Up @@ -3464,6 +3466,7 @@ fn test_linux(target: &str) {
|| name.starts_with("F_")
|| name.starts_with("FALLOC_FL_")
|| name.starts_with("IFLA_")
|| name.starts_with("KEXEC_")
|| name.starts_with("MS_")
|| name.starts_with("MSG_")
|| name.starts_with("OPEN_TREE_")
Expand Down
6 changes: 6 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,12 @@ IXANY
IXOFF
IXON
JFFS2_SUPER_MAGIC
KEXEC_ARCH_MASK
KEXEC_FILE_NO_INITRAMFS
KEXEC_FILE_ON_CRASH
KEXEC_FILE_UNLOAD
KEXEC_ON_CRASH
KEXEC_PRESERVE_CONTEXT
KEY_CNT
KEY_MAX
LC_ADDRESS
Expand Down
6 changes: 6 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,12 @@ J1939_PGN_MAX
J1939_PGN_PDU1_MAX
J1939_PGN_REQUEST
KERNEL_VERSION
KEXEC_ARCH_MASK
KEXEC_FILE_NO_INITRAMFS
KEXEC_FILE_ON_CRASH
KEXEC_FILE_UNLOAD
KEXEC_ON_CRASH
KEXEC_PRESERVE_CONTEXT
KEYCTL_ASSUME_AUTHORITY
KEYCTL_CHOWN
KEYCTL_CLEAR
Expand Down
8 changes: 8 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,14 @@ pub const AI_ADDRCONFIG: ::c_int = 0x00000400;
pub const AI_V4MAPPED: ::c_int = 0x00000800;
pub const AI_DEFAULT: ::c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG;

// linux/kexec.h
pub const KEXEC_ON_CRASH: ::c_int = 0x00000001;
pub const KEXEC_PRESERVE_CONTEXT: ::c_int = 0x00000002;
pub const KEXEC_ARCH_MASK: ::c_int = 0xffff0000;
pub const KEXEC_FILE_UNLOAD: ::c_int = 0x00000001;
pub const KEXEC_FILE_ON_CRASH: ::c_int = 0x00000002;
pub const KEXEC_FILE_NO_INITRAMFS: ::c_int = 0x00000004;

pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
Expand Down
8 changes: 8 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3550,6 +3550,14 @@ pub fn FUTEX_OP(op: ::c_int, oparg: ::c_int, cmp: ::c_int, cmparg: ::c_int) -> :
((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff)
}

// linux/kexec.h
pub const KEXEC_ON_CRASH: ::c_int = 0x00000001;
pub const KEXEC_PRESERVE_CONTEXT: ::c_int = 0x00000002;
pub const KEXEC_ARCH_MASK: ::c_int = 0xffff0000;
pub const KEXEC_FILE_UNLOAD: ::c_int = 0x00000001;
pub const KEXEC_FILE_ON_CRASH: ::c_int = 0x00000002;
pub const KEXEC_FILE_NO_INITRAMFS: ::c_int = 0x00000004;

// linux/reboot.h
pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
Expand Down