Skip to content

Commit 8b76797

Browse files
committed
Revert "Share reboot code between Linux & Android"
This reverts commit ea0a870.
1 parent 5d65c3f commit 8b76797

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,13 @@ pub const LOG_NFACILITIES: ::c_int = 24;
462462

463463
pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
464464

465+
pub const RB_AUTOBOOT: ::c_int = 0x01234567;
466+
pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123;
467+
pub const RB_ENABLE_CAD: ::c_int = 0x89abcdef;
468+
pub const RB_DISABLE_CAD: ::c_int = 0;
469+
pub const RB_POWER_OFF: ::c_int = 0x4321fedc;
470+
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2;
471+
pub const RB_KEXEC: ::c_int = 0x45584543;
465472

466473
f! {
467474
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
@@ -634,6 +641,7 @@ extern {
634641
remote_iov: *const ::iovec,
635642
riovcnt: ::c_ulong,
636643
flags: ::c_ulong) -> isize;
644+
pub fn reboot(how_to: ::c_int) -> ::c_int;
637645

638646
// Not available now on Android
639647
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,

src/unix/notbsd/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,6 @@ pub const PIPE_BUF: usize = 4096;
666666

667667
pub const SI_LOAD_SHIFT: ::c_uint = 16;
668668

669-
pub const RB_AUTOBOOT: ::c_int = 0x01234567;
670-
pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123;
671-
pub const RB_ENABLE_CAD: ::c_int = 0x89abcdef;
672-
pub const RB_DISABLE_CAD: ::c_int = 0;
673-
pub const RB_POWER_OFF: ::c_int = 0x4321fedc;
674-
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2;
675-
pub const RB_KEXEC: ::c_int = 0x45584543;
676-
677669
f! {
678670
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
679671
let fd = fd as usize;
@@ -868,7 +860,6 @@ extern {
868860
linkpath: *const ::c_char) -> ::c_int;
869861
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
870862
flags: ::c_int) -> ::c_int;
871-
pub fn reboot(how_to: ::c_int) -> ::c_int;
872863
}
873864

874865
cfg_if! {

0 commit comments

Comments
 (0)