Definitions and explanations of errornumber commonly used in Linux systems-general Linux technology-Linux programming and kernel information. The following is a detailed description. Before explaining these error definitions, Let's see why we need to know these common error numbers?
For people who write C Programs, errno is not a strange variable, whether you are in the user or kernel state. In short, errno is used to save error information, which reflects the cause of the error. Therefore, a small errno can connect the user space programmer and the kernel space programmers to see their importance. However, our programmers often ignore this. They tend to focus only on correctness and errors, rather than accessing powerful errno for more information. For a common program, it may only be "no matter, you can restart it if it's a big deal ". However, for some important tasks, restarting may mean a disaster, especially in important fields. To this end, I would like to list common errno for you and remind you to "check errno when your routine failed when processing the device! ".
Linux errno is at 0. * There are only about 30 or 40 Linux kenel versions, but when linux kenel expands rapidly, the number of errno instances is also increasing. Specifically, how many errno instances are in your Linux version, you can view it through man errno or open the file directly:
Include/linux/errno. h
Here we only list some common or earliest errno: