summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2014-10-06 22:11:47 -0700
committerCarl Lerche <me@carllerche.com>2014-10-06 22:11:47 -0700
commite8324e4c4464510275fd6f4a4027ef1326977e1d (patch)
tree9be0d84683f4576b46c27a3f31430790a24a9086
parent7c4fa8232df48dc324119ff8d742a35458dec02e (diff)
downloadnix-e8324e4c4464510275fd6f4a4027ef1326977e1d.zip
Fix warnings
-rw-r--r--src/sys/eventfd.rs2
-rw-r--r--src/sys/stat.rs2
-rw-r--r--src/syscall.rs2
-rw-r--r--src/unistd.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/sys/eventfd.rs b/src/sys/eventfd.rs
index f6cdacae..a60dcd6e 100644
--- a/src/sys/eventfd.rs
+++ b/src/sys/eventfd.rs
@@ -1,7 +1,7 @@
use std::mem;
use libc::{c_int, c_uint};
use fcntl::Fd;
-use errno::{SysResult, SysError, from_ffi};
+use errno::{SysResult, SysError};
bitflags!(
flags EventFdFlag: c_int {
diff --git a/src/sys/stat.rs b/src/sys/stat.rs
index 0a6c2450..2f2737d4 100644
--- a/src/sys/stat.rs
+++ b/src/sys/stat.rs
@@ -40,8 +40,8 @@ pub fn mknod(path: &Path, kind: SFlag, perm: FilePermission, dev: dev_t) -> SysR
from_ffi(res)
}
+#[cfg(target_os = "linux")]
static MINORBITS: uint = 20;
-// static MINORMASK: dev_t = ((1 << MINORBITS) - 1);
#[cfg(target_os = "linux")]
pub fn mkdev(major: u64, minor: u64) -> dev_t {
diff --git a/src/syscall.rs b/src/syscall.rs
index 85f6e730..9a9c996a 100644
--- a/src/syscall.rs
+++ b/src/syscall.rs
@@ -8,7 +8,7 @@ mod arch {
pub type Syscall = c_long;
- pub static SysPivotRoot: Syscall = 155;
+ pub static SYSPIVOTROOT: Syscall = 155;
}
extern {
diff --git a/src/unistd.rs b/src/unistd.rs
index 14e6e66e..cef12f0e 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -306,7 +306,7 @@ fn pipe2_setflags(fd1: Fd, fd2: Fd, flags: OFlag) -> SysResult<()> {
#[cfg(target_os = "linux")]
mod linux {
use std::path::Path;
- use syscall::{syscall, SysPivotRoot};
+ use syscall::{syscall, SYSPIVOTROOT};
use errno::{SysResult, SysError};
pub fn pivot_root(new_root: &Path, put_old: &Path) -> SysResult<()> {
@@ -314,7 +314,7 @@ mod linux {
let put_old = put_old.to_c_str();
let res = unsafe {
- syscall(SysPivotRoot, new_root.as_ptr(), put_old.as_ptr())
+ syscall(SYSPIVOTROOT, new_root.as_ptr(), put_old.as_ptr())
};
if res != 0 {