Function nc::syscalls::check_errno

source ·
pub const fn check_errno(ret: usize) -> Result<usize, Errno>
Expand description

Check return value is error or not.

Returning from the syscall, a value in the range between -4095 and -1 indicates an error, it is -errno.

§Errors

Returns errno if system call fails.