pub fn to_result(err: c_int) -> Result
Expand description

Converts an integer as returned by a C kernel function to an error if it’s negative, and Ok(()) otherwise.