diff options
Diffstat (limited to 'src/mount.rs')
-rw-r--r-- | src/mount.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mount.rs b/src/mount.rs index cd0afa0a..c08c3fd8 100644 --- a/src/mount.rs +++ b/src/mount.rs @@ -1,5 +1,6 @@ use libc::{c_ulong, c_int}; -use {Result, NixPath, from_ffi}; +use NixPath; +use errno::{Errno, Result}; bitflags!( flags MsFlags: c_ulong { @@ -90,7 +91,7 @@ pub fn mount<P1: ?Sized + NixPath, P2: ?Sized + NixPath, P3: ?Sized + NixPath, P }) }))))); - from_ffi(res) + Errno::result(res).map(drop) } pub fn umount<P: ?Sized + NixPath>(target: &P) -> Result<()> { @@ -98,7 +99,7 @@ pub fn umount<P: ?Sized + NixPath>(target: &P) -> Result<()> { unsafe { ffi::umount(cstr.as_ptr()) } })); - from_ffi(res) + Errno::result(res).map(drop) } pub fn umount2<P: ?Sized + NixPath>(target: &P, flags: MntFlags) -> Result<()> { @@ -106,5 +107,5 @@ pub fn umount2<P: ?Sized + NixPath>(target: &P, flags: MntFlags) -> Result<()> { unsafe { ffi::umount2(cstr.as_ptr(), flags.bits) } })); - from_ffi(res) + Errno::result(res).map(drop) } |