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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#ifndef ERRNO_H
#define ERRNO_H
#define ERROR_PERM 1 /* Operation not permitted */
#define ERROR_NOENT 2 /* No such file or directory */
#define ERROR_SRCH 3 /* No such process */
#define ERROR_INTR 4 /* Interrupted system call */
#define ERROR_IO 5 /* I/O error */
#define ERROR_NXIO 6 /* No such device or address */
#define ERROR_2BIG 7 /* Argument list too long */
#define ERROR_NOEXEC 8 /* Exec format error */
#define ERROR_BADF 9 /* Bad file number */
#define ERROR_CHILD 10 /* No child processes */
#define ERROR_AGAIN 11 /* Try again */
#define ERROR_NOMEM 12 /* Out of memory */
#define ERROR_ACCES 13 /* Permission denied */
#define ERROR_FAULT 14 /* Bad address */
#define ERROR_NOTBLK 15 /* Block device required */
#define ERROR_BUSY 16 /* Device or resource busy */
#define ERROR_EXIST 17 /* File exists */
#define ERROR_XDEV 18 /* Cross-device link */
#define ERROR_NODEV 19 /* No such device */
#define ERROR_NOTDIR 20 /* Not a directory */
#define ERROR_ISDIR 21 /* Is a directory */
#define ERROR_INVAL 22 /* Invalid argument */
#define ERROR_NFILE 23 /* File table overflow */
#define ERROR_MFILE 24 /* Too many open files */
#define ERROR_NOTTY 25 /* Not a typewriter */
#define ERROR_TXTBSY 26 /* Text file busy */
#define ERROR_FBIG 27 /* File too large */
#define ERROR_NOSPC 28 /* No space left on device */
#define ERROR_SPIPE 29 /* Illegal seek */
#define ERROR_ROFS 30 /* Read-only file system */
#define ERROR_MLINK 31 /* Too many links */
#define ERROR_PIPE 32 /* Broken pipe */
#define ERROR_DOM 33 /* Math argument out of domain of func */
#define ERROR_RANGE 34 /* Math result not representable */
static const char *errstr[] = {
"",
"Operation not permitted",
"No such file or directory",
"No such process",
"Interrupted system call",
"I/O error",
"No such device or address",
"Argument list too long",
"Exec format error",
"Bad file number",
"No child processes",
"Try again",
"Out of memory",
"Permission denied",
"Bad address",
"Block device required",
"Device or resource busy",
"File exists",
"Cross-device link",
"No such device",
"Not a directory",
"Is a directory",
"Invalid argument",
"File table overflow",
"Too many open files",
"Not a typewriter",
"Text file busy",
"File too large",
"No space left on device",
"Illegal seek",
"Read-only file system",
"Too many links",
"Broken pipe",
"Math argument out of domain of func",
"Math result not representable",
};
#endif
|