devela::_dep::nc::call

Function swapoff

pub unsafe fn swapoff<P>(filename: P) -> Result<(), i32> 
where P: AsRef<Path>,
Available on crate feature dep_nc only.
Expand description

Stop swapping to file/device.

§Examples

let filename = "/dev/sda-no-exist";
let ret = unsafe { nc::swapoff(filename) };
assert!(ret.is_err());
assert_eq!(ret, Err(nc::EPERM));