summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/aio.rs3
-rw-r--r--src/sys/epoll.rs3
-rw-r--r--src/sys/eventfd.rs3
-rw-r--r--src/sys/ioctl/mod.rs8
-rw-r--r--src/sys/memfd.rs3
-rw-r--r--src/sys/mman.rs3
-rw-r--r--src/sys/ptrace.rs3
-rw-r--r--src/sys/quota.rs3
-rw-r--r--src/sys/reboot.rs3
-rw-r--r--src/sys/select.rs3
-rw-r--r--src/sys/sendfile.rs3
-rw-r--r--src/sys/signal.rs3
-rw-r--r--src/sys/signalfd.rs3
-rw-r--r--src/sys/socket/addr.rs3
-rw-r--r--src/sys/socket/mod.rs3
-rw-r--r--src/sys/socket/sockopt.rs3
-rw-r--r--src/sys/stat.rs3
-rw-r--r--src/sys/statfs.rs3
-rw-r--r--src/sys/statvfs.rs3
-rw-r--r--src/sys/termios.rs3
-rw-r--r--src/sys/uio.rs3
-rw-r--r--src/sys/wait.rs3
22 files changed, 47 insertions, 24 deletions
diff --git a/src/sys/aio.rs b/src/sys/aio.rs
index 6166467c..fbae4443 100644
--- a/src/sys/aio.rs
+++ b/src/sys/aio.rs
@@ -1,4 +1,5 @@
-use {Error, Errno, Result};
+use {Error, Result};
+use errno::Errno;
use std::os::unix::io::RawFd;
use libc::{c_void, off_t, size_t};
use libc;
diff --git a/src/sys/epoll.rs b/src/sys/epoll.rs
index 5d63e82f..43a543ab 100644
--- a/src/sys/epoll.rs
+++ b/src/sys/epoll.rs
@@ -1,4 +1,5 @@
-use {Errno, Result};
+use Result;
+use errno::Errno;
use libc::{self, c_int};
use std::os::unix::io::RawFd;
use std::ptr;
diff --git a/src/sys/eventfd.rs b/src/sys/eventfd.rs
index 51091478..c5a54e46 100644
--- a/src/sys/eventfd.rs
+++ b/src/sys/eventfd.rs
@@ -1,6 +1,7 @@
use libc;
use std::os::unix::io::RawFd;
-use {Errno, Result};
+use Result;
+use errno::Errno;
libc_bitflags! {
pub struct EfdFlags: libc::c_int {
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs
index b29c8b42..4169920b 100644
--- a/src/sys/ioctl/mod.rs
+++ b/src/sys/ioctl/mod.rs
@@ -66,7 +66,8 @@
//! ```
//! # #[macro_use] extern crate nix;
//! # use std::mem;
-//! # use nix::{Errno, libc, Result};
+//! # use nix::{libc, Result};
+//! # use nix::errno::Errno;
//! # use nix::libc::c_int as c_int;
//! # const SPI_IOC_MAGIC: u8 = b'k'; // Defined in linux/spi/spidev.h
//! # const SPI_IOC_TYPE_MODE: u8 = 1;
@@ -176,7 +177,8 @@
//! ```
//! # #[macro_use] extern crate nix;
//! # use std::mem;
-//! # use nix::{Errno, libc, Result};
+//! # use nix::{libc, Result};
+//! # use nix::errno::Errno;
//! # use nix::libc::c_int as c_int;
//! # const SPI_IOC_MAGIC: u8 = b'k';
//! # const SPI_IOC_TYPE_MESSAGE: u8 = 0;
@@ -248,7 +250,7 @@ pub use self::platform::*;
macro_rules! convert_ioctl_res {
($w:expr) => (
{
- $crate::Errno::result($w)
+ $crate::errno::Errno::result($w)
}
);
}
diff --git a/src/sys/memfd.rs b/src/sys/memfd.rs
index 88c1dac9..9672429b 100644
--- a/src/sys/memfd.rs
+++ b/src/sys/memfd.rs
@@ -1,6 +1,7 @@
use libc;
use std::os::unix::io::RawFd;
-use {Errno, Result};
+use Result;
+use errno::Errno;
use std::ffi::CStr;
libc_bitflags!(
diff --git a/src/sys/mman.rs b/src/sys/mman.rs
index dc21899b..a32cd54a 100644
--- a/src/sys/mman.rs
+++ b/src/sys/mman.rs
@@ -1,4 +1,5 @@
-use {Errno, Error, Result, NixPath};
+use {Error, Result, NixPath};
+use errno::Errno;
use fcntl::OFlag;
use libc::{self, c_int, c_void, size_t, off_t};
use sys::stat::Mode;
diff --git a/src/sys/ptrace.rs b/src/sys/ptrace.rs
index 43a78862..e2b153d8 100644
--- a/src/sys/ptrace.rs
+++ b/src/sys/ptrace.rs
@@ -1,7 +1,8 @@
//! For detailed description of the ptrace requests, consult `man ptrace`.
use std::{mem, ptr};
-use {Errno, Error, Result};
+use {Error, Result};
+use errno::Errno;
use libc::{self, c_void, c_long, siginfo_t};
use ::unistd::Pid;
use sys::signal::Signal;
diff --git a/src/sys/quota.rs b/src/sys/quota.rs
index 4a8fdf5e..abe114f0 100644
--- a/src/sys/quota.rs
+++ b/src/sys/quota.rs
@@ -15,7 +15,8 @@
use std::default::Default;
use std::{mem, ptr};
use libc::{self, c_int, c_char};
-use {Errno, Result, NixPath};
+use {Result, NixPath};
+use errno::Errno;
struct QuotaCmd(QuotaSubCmd, QuotaType);
diff --git a/src/sys/reboot.rs b/src/sys/reboot.rs
index 5b340e32..bafa8fc1 100644
--- a/src/sys/reboot.rs
+++ b/src/sys/reboot.rs
@@ -1,6 +1,7 @@
//! Reboot/shutdown or enable/disable Ctrl-Alt-Delete.
-use {Errno, Error, Result};
+use {Error, Result};
+use errno::Errno;
use libc;
use void::Void;
use std::mem::drop;
diff --git a/src/sys/select.rs b/src/sys/select.rs
index 252fa6bc..9a429103 100644
--- a/src/sys/select.rs
+++ b/src/sys/select.rs
@@ -2,7 +2,8 @@ use std::mem;
use std::os::unix::io::RawFd;
use std::ptr::null_mut;
use libc::{self, c_int};
-use {Errno, Result};
+use Result;
+use errno::Errno;
use sys::time::TimeVal;
pub use libc::FD_SETSIZE;
diff --git a/src/sys/sendfile.rs b/src/sys/sendfile.rs
index 2c39ea90..7f7a7751 100644
--- a/src/sys/sendfile.rs
+++ b/src/sys/sendfile.rs
@@ -3,7 +3,8 @@ use std::ptr;
use libc::{self, off_t};
-use {Errno, Result};
+use Result;
+use errno::Errno;
pub fn sendfile(out_fd: RawFd, in_fd: RawFd, offset: Option<&mut off_t>, count: usize) -> Result<usize> {
let offset = offset.map(|offset| offset as *mut _).unwrap_or(ptr::null_mut());
diff --git a/src/sys/signal.rs b/src/sys/signal.rs
index 967c6416..f82e4502 100644
--- a/src/sys/signal.rs
+++ b/src/sys/signal.rs
@@ -2,7 +2,8 @@
// See http://rust-lang.org/COPYRIGHT.
use libc;
-use {Errno, Error, Result};
+use {Error, Result};
+use errno::Errno;
use std::mem;
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
use std::os::unix::io::RawFd;
diff --git a/src/sys/signalfd.rs b/src/sys/signalfd.rs
index bbd38b23..7ea09ee3 100644
--- a/src/sys/signalfd.rs
+++ b/src/sys/signalfd.rs
@@ -17,7 +17,8 @@
//! signal handlers.
use libc;
use unistd;
-use {Error, Errno, Result};
+use {Error, Result};
+use errno::Errno;
pub use sys::signal::{self, SigSet};
pub use libc::signalfd_siginfo as siginfo;
diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs
index a1f86518..b479c9cd 100644
--- a/src/sys/socket/addr.rs
+++ b/src/sys/socket/addr.rs
@@ -1,5 +1,6 @@
use super::sa_family_t;
-use {Errno, Error, Result, NixPath};
+use {Error, Result, NixPath};
+use errno::Errno;
use libc;
use std::{fmt, hash, mem, net, ptr, slice};
use std::ffi::OsStr;
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs
index cdb8b4b3..c7d6d581 100644
--- a/src/sys/socket/mod.rs
+++ b/src/sys/socket/mod.rs
@@ -1,7 +1,8 @@
//! Socket interface functions
//!
//! [Further reading](http://man7.org/linux/man-pages/man7/socket.7.html)
-use {Error, Errno, Result};
+use {Error, Result};
+use errno::Errno;
use features;
use libc::{self, c_void, c_int, socklen_t, size_t, pid_t, uid_t, gid_t};
use std::{mem, ptr, slice};
diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs
index 98a4eeac..4741ec66 100644
--- a/src/sys/socket/sockopt.rs
+++ b/src/sys/socket/sockopt.rs
@@ -1,5 +1,6 @@
use super::{GetSockOpt, SetSockOpt};
-use {Errno, Result};
+use Result;
+use errno::Errno;
use sys::time::TimeVal;
use libc::{self, c_int, uint8_t, c_void, socklen_t};
use std::mem;
diff --git a/src/sys/stat.rs b/src/sys/stat.rs
index 7a0b3970..9c0129f5 100644
--- a/src/sys/stat.rs
+++ b/src/sys/stat.rs
@@ -1,7 +1,8 @@
pub use libc::dev_t;
pub use libc::stat as FileStat;
-use {Errno, Result, NixPath};
+use {Result, NixPath};
+use errno::Errno;
use fcntl::AtFlags;
use libc::{self, mode_t};
use std::mem;
diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs
index afa61468..6d4fafe9 100644
--- a/src/sys/statfs.rs
+++ b/src/sys/statfs.rs
@@ -1,4 +1,5 @@
-use {Errno, Result, NixPath};
+use {Result, NixPath};
+use errno::Errno;
use std::os::unix::io::AsRawFd;
use libc;
diff --git a/src/sys/statvfs.rs b/src/sys/statvfs.rs
index 2cfc61af..0a0dab7f 100644
--- a/src/sys/statvfs.rs
+++ b/src/sys/statvfs.rs
@@ -7,7 +7,8 @@ use std::os::unix::io::AsRawFd;
use libc::{self, c_ulong};
-use {Errno, Result, NixPath};
+use {Result, NixPath};
+use errno::Errno;
bitflags!(
/// File system mount Flags
diff --git a/src/sys/termios.rs b/src/sys/termios.rs
index 34d960ff..e27cee40 100644
--- a/src/sys/termios.rs
+++ b/src/sys/termios.rs
@@ -43,7 +43,8 @@
//! termios.control_flags |= ControlFlags::CS5;
//! ```
-use {Errno, Result};
+use Result;
+use errno::Errno;
use libc::{self, c_int, tcflag_t};
use std::cell::{Ref, RefCell};
use std::convert::From;
diff --git a/src/sys/uio.rs b/src/sys/uio.rs
index 16426ab9..cd161423 100644
--- a/src/sys/uio.rs
+++ b/src/sys/uio.rs
@@ -1,7 +1,8 @@
// Silence invalid warnings due to rust-lang/rust#16719
#![allow(improper_ctypes)]
-use {Errno, Result};
+use Result;
+use errno::Errno;
use libc::{self, c_int, c_void, size_t, off_t};
use std::marker::PhantomData;
use std::os::unix::io::RawFd;
diff --git a/src/sys/wait.rs b/src/sys/wait.rs
index 019b751f..6243634f 100644
--- a/src/sys/wait.rs
+++ b/src/sys/wait.rs
@@ -1,5 +1,6 @@
use libc::{self, c_int};
-use {Errno, Result};
+use Result;
+use errno::Errno;
use unistd::Pid;
use sys::signal::Signal;