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
|
/* For errno -> error conversion. An error's index is the corresponding
* errno value (minus 1). */
struct {
char* errname;
char* errmesg;
} errors[] = {
{ "EPERM", "operation not permitted" },
{ "ENOENT", "no such file or directory" },
{ "ESRCH", "no such process" },
{ "EINTR", "interrupted system call" },
{ "EIO", "input/output error" },
{ "ENXIO", "no such device/address" },
{ "E2BIG", "argument list too long" },
{ "ENOEXEC", "exec format error" },
{ "EBADF", "bad file number" },
{ "ECHILD", "no child process" },
{ "EAGAIN", "try again" },
{ "ENOMEM", "not enough memory" },
{ "EACCES", "permission denied" },
{ "EFAULT", "bad address" },
{ "ENOTBLK", "block device required" },
{ "EBUSY", "device/resource is busy" },
{ "EEXIST", "file exists already" },
{ "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 typewriter" }, /* What the hell??? */
{ "ETXTBSY", "text file is busy" },
{ "EFBIG", "file too large" },
{ "ENOSPC", "not enough/no disk space" },
{ "ESPIPE", "illegal seek" },
{ "EROFS", "read-only file system" },
{ "EMLINK", "too many links" },
{ "EPIPE", "broken pipe" },
{ NULL, NULL }
};
|