Function sysctl::set_value [] [src]

pub fn set_value(name: &str, value: CtlValue) -> Result<CtlValue, String>

Sets the value of a sysctl. Fetches and returns the new value if successful, errno string if failure.

Example

extern crate sysctl;

fn main() {
    println!("{:?}", sysctl::set_value("hw.usb.debug", sysctl::CtlValue::Int(1)));
}