pub fn unpack_standard_result(raw: V) -> Result<V, i32>
Expand description
Given a result value from a system call that follows the standard error return convention for this platform, returns either the given value verbatim or the kernel error code extracted from it.
For x86_64, the standard way to signal an error is to return a result between -4095 and -1 inclusive, with all other values representing successful results.
A small number of system calls signal errors in different ways. This function is not compatible with the results from those calls.