-
Notifications
You must be signed in to change notification settings - Fork 16
/
errno.c
42 lines (40 loc) · 1.25 KB
/
errno.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "errno.h"
char *sys_errlist[] = {
[0] = "Invalid error number",
[EPERM] = "Operation not permitted",
[ENOENT] = "No such file or directory",
[ESRCH] = "No such process",
[EINTR] = "Interrupted system call",
[EIO] = "I/O error",
[ENXIO] = "No such device or address",
[E2BIG] = "Argument list too long",
[ENOEXEC] = "Exec format error",
[EBADF] = "Bad file number",
[ECHILD] = "No child processes",
[EAGAIN] = "Operation would block",
[ENOMEM] = "Out of memory",
[EACCES] = "Permission denied",
[EFAULT] = "Bad address",
[ENOTBLK] = "Block device required",
[EBUSY] = "Device or resource busy",
[EEXIST] = "File exists",
[EXDEV] = "Cross-device link",
[ENODEV] = "No such device",
[ENOTDIR] = "Not a directory",
[EISDIR] = "Is a directory",
[EINVAL] = "Invalid argument",
[ENFILE] = "File table overflow",
[EMFILE] = "Too many open files",
[ENOTTY] = "Not a tty",
[ETXTBSY] = "Text file busy",
[EFBIG] = "File too large",
[ENOSPC] = "No space left on device",
[ESPIPE] = "Illegal seek",
[EROFS] = "Read-only file system",
[EMLINK] = "Too many links",
[EPIPE] = "Broken pipe",
[EDOM] = "Argument outside domain",
[ERANGE] = "Result not representable",
};
int errno;
int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);