October 2017
Intermediate to advanced
586 pages
14h 8m
English
Returning the wrong error code for a given error will result in either the kernel or user space app producing unwanted behavior and making a wrong decision. To keep things clear, there are predefined errors in the kernel tree that cover almost every case you may face. Some of the errors (with their meanings) are defined in include/uapi/asm-generic/errno-base.h, and the rest of the list can be found in include/uapi/asm-generic/errno.h. The following is an excerpt from the list of errors, from include/uapi/asm-generic/errno-base.h:
#define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O ...
Read now
Unlock full access