Skip to content

Commit 42cb2b6

Browse files
committed
Move linux/reboot.h constants into linux module
1 parent 7455403 commit 42cb2b6

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -667,21 +667,6 @@ pub const EPOLLWAKEUP: ::c_int = 0x20000000;
667667
pub const SEEK_DATA: ::c_int = 3;
668668
pub const SEEK_HOLE: ::c_int = 4;
669669

670-
pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
671-
pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
672-
pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
673-
pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
674-
pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
675-
676-
pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
677-
pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
678-
pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
679-
pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
680-
pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
681-
pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
682-
pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
683-
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
684-
685670
// linux/rtnetlink.h
686671
pub const TCA_PAD: ::c_ushort = 9;
687672
pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;

src/unix/linux_like/linux/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,6 +2373,22 @@ pub const FUTEX_CLOCK_REALTIME: ::c_int = 256;
23732373
pub const FUTEX_CMD_MASK: ::c_int =
23742374
!(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME);
23752375

2376+
// linux/reboot.h
2377+
pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
2378+
pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
2379+
pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
2380+
pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
2381+
pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
2382+
2383+
pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
2384+
pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
2385+
pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
2386+
pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
2387+
pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
2388+
pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
2389+
pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
2390+
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
2391+
23762392
f! {
23772393
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
23782394
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)

0 commit comments

Comments
 (0)