summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2016-07-12 20:56:43 +0300
committerSergey Bugaev <bugaevc@gmail.com>2016-07-12 20:56:43 +0300
commit8b76797d8f05bc5e52b7eb366d718cc2e446799f (patch)
tree7f0ba97a74de5b44b9d17d60b35f1c68648944db
parent5d65c3f2463ecad20eb02d383729b9c408ecacad (diff)
downloadrust-libc-8b76797d8f05bc5e52b7eb366d718cc2e446799f.tar.gz
Revert "Share reboot code between Linux & Android"
This reverts commit ea0a870b4f3c3b1726be6bc6c18006555b1ae253.
-rw-r--r--src/unix/notbsd/linux/mod.rs8
-rw-r--r--src/unix/notbsd/mod.rs9
2 files changed, 8 insertions, 9 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 3ead50d894..9141ff4160 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -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,
diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs
index e9a9314146..f1add7f6ea 100644
--- a/src/unix/notbsd/mod.rs
+++ b/src/unix/notbsd/mod.rs
@@ -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! {