Revert "Share reboot code between Linux & Android"

This reverts commit ea0a870b4f.
This commit is contained in:
Sergey Bugaev 2016-07-12 20:56:43 +03:00
parent 5d65c3f246
commit 8b76797d8f
2 changed files with 8 additions and 9 deletions

View File

@ -462,6 +462,13 @@ pub const LOG_NFACILITIES: ::c_int = 24;
pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
pub const RB_AUTOBOOT: ::c_int = 0x01234567;
pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123;
pub const RB_ENABLE_CAD: ::c_int = 0x89abcdef;
pub const RB_DISABLE_CAD: ::c_int = 0;
pub const RB_POWER_OFF: ::c_int = 0x4321fedc;
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2;
pub const RB_KEXEC: ::c_int = 0x45584543;
f! {
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
@ -634,6 +641,7 @@ extern {
remote_iov: *const ::iovec,
riovcnt: ::c_ulong,
flags: ::c_ulong) -> isize;
pub fn reboot(how_to: ::c_int) -> ::c_int;
// Not available now on Android
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,

View File

@ -666,14 +666,6 @@ pub const PIPE_BUF: usize = 4096;
pub const SI_LOAD_SHIFT: ::c_uint = 16;
pub const RB_AUTOBOOT: ::c_int = 0x01234567;
pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123;
pub const RB_ENABLE_CAD: ::c_int = 0x89abcdef;
pub const RB_DISABLE_CAD: ::c_int = 0;
pub const RB_POWER_OFF: ::c_int = 0x4321fedc;
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2;
pub const RB_KEXEC: ::c_int = 0x45584543;
f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let fd = fd as usize;
@ -868,7 +860,6 @@ extern {
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn reboot(how_to: ::c_int) -> ::c_int;
}
cfg_if! {