|
@@ -1473,6 +1473,12 @@ const (
|
|
|
WORDSIZE = 0x20
|
|
|
WSTOPPED = 0x8
|
|
|
WUNTRACED = 0x2
|
|
|
+ XATTR_CREATE = 0x2
|
|
|
+ XATTR_NODEFAULT = 0x10
|
|
|
+ XATTR_NOFOLLOW = 0x1
|
|
|
+ XATTR_NOSECURITY = 0x8
|
|
|
+ XATTR_REPLACE = 0x4
|
|
|
+ XATTR_SHOWCOMPRESSION = 0x20
|
|
|
)
|
|
|
|
|
|
// Errors
|
|
@@ -1624,146 +1630,154 @@ const (
|
|
|
)
|
|
|
|
|
|
// Error table
|
|
|
-var errors = [...]string{
|
|
|
- 1: "operation not permitted",
|
|
|
- 2: "no such file or directory",
|
|
|
- 3: "no such process",
|
|
|
- 4: "interrupted system call",
|
|
|
- 5: "input/output error",
|
|
|
- 6: "device not configured",
|
|
|
- 7: "argument list too long",
|
|
|
- 8: "exec format error",
|
|
|
- 9: "bad file descriptor",
|
|
|
- 10: "no child processes",
|
|
|
- 11: "resource deadlock avoided",
|
|
|
- 12: "cannot allocate memory",
|
|
|
- 13: "permission denied",
|
|
|
- 14: "bad address",
|
|
|
- 15: "block device required",
|
|
|
- 16: "resource busy",
|
|
|
- 17: "file exists",
|
|
|
- 18: "cross-device link",
|
|
|
- 19: "operation not supported by device",
|
|
|
- 20: "not a directory",
|
|
|
- 21: "is a directory",
|
|
|
- 22: "invalid argument",
|
|
|
- 23: "too many open files in system",
|
|
|
- 24: "too many open files",
|
|
|
- 25: "inappropriate ioctl for device",
|
|
|
- 26: "text file busy",
|
|
|
- 27: "file too large",
|
|
|
- 28: "no space left on device",
|
|
|
- 29: "illegal seek",
|
|
|
- 30: "read-only file system",
|
|
|
- 31: "too many links",
|
|
|
- 32: "broken pipe",
|
|
|
- 33: "numerical argument out of domain",
|
|
|
- 34: "result too large",
|
|
|
- 35: "resource temporarily unavailable",
|
|
|
- 36: "operation now in progress",
|
|
|
- 37: "operation already in progress",
|
|
|
- 38: "socket operation on non-socket",
|
|
|
- 39: "destination address required",
|
|
|
- 40: "message too long",
|
|
|
- 41: "protocol wrong type for socket",
|
|
|
- 42: "protocol not available",
|
|
|
- 43: "protocol not supported",
|
|
|
- 44: "socket type not supported",
|
|
|
- 45: "operation not supported",
|
|
|
- 46: "protocol family not supported",
|
|
|
- 47: "address family not supported by protocol family",
|
|
|
- 48: "address already in use",
|
|
|
- 49: "can't assign requested address",
|
|
|
- 50: "network is down",
|
|
|
- 51: "network is unreachable",
|
|
|
- 52: "network dropped connection on reset",
|
|
|
- 53: "software caused connection abort",
|
|
|
- 54: "connection reset by peer",
|
|
|
- 55: "no buffer space available",
|
|
|
- 56: "socket is already connected",
|
|
|
- 57: "socket is not connected",
|
|
|
- 58: "can't send after socket shutdown",
|
|
|
- 59: "too many references: can't splice",
|
|
|
- 60: "operation timed out",
|
|
|
- 61: "connection refused",
|
|
|
- 62: "too many levels of symbolic links",
|
|
|
- 63: "file name too long",
|
|
|
- 64: "host is down",
|
|
|
- 65: "no route to host",
|
|
|
- 66: "directory not empty",
|
|
|
- 67: "too many processes",
|
|
|
- 68: "too many users",
|
|
|
- 69: "disc quota exceeded",
|
|
|
- 70: "stale NFS file handle",
|
|
|
- 71: "too many levels of remote in path",
|
|
|
- 72: "RPC struct is bad",
|
|
|
- 73: "RPC version wrong",
|
|
|
- 74: "RPC prog. not avail",
|
|
|
- 75: "program version wrong",
|
|
|
- 76: "bad procedure for program",
|
|
|
- 77: "no locks available",
|
|
|
- 78: "function not implemented",
|
|
|
- 79: "inappropriate file type or format",
|
|
|
- 80: "authentication error",
|
|
|
- 81: "need authenticator",
|
|
|
- 82: "device power is off",
|
|
|
- 83: "device error",
|
|
|
- 84: "value too large to be stored in data type",
|
|
|
- 85: "bad executable (or shared library)",
|
|
|
- 86: "bad CPU type in executable",
|
|
|
- 87: "shared library version mismatch",
|
|
|
- 88: "malformed Mach-o file",
|
|
|
- 89: "operation canceled",
|
|
|
- 90: "identifier removed",
|
|
|
- 91: "no message of desired type",
|
|
|
- 92: "illegal byte sequence",
|
|
|
- 93: "attribute not found",
|
|
|
- 94: "bad message",
|
|
|
- 95: "EMULTIHOP (Reserved)",
|
|
|
- 96: "no message available on STREAM",
|
|
|
- 97: "ENOLINK (Reserved)",
|
|
|
- 98: "no STREAM resources",
|
|
|
- 99: "not a STREAM",
|
|
|
- 100: "protocol error",
|
|
|
- 101: "STREAM ioctl timeout",
|
|
|
- 102: "operation not supported on socket",
|
|
|
- 103: "policy not found",
|
|
|
- 104: "state not recoverable",
|
|
|
- 105: "previous owner died",
|
|
|
- 106: "interface output queue is full",
|
|
|
+var errorList = [...]struct {
|
|
|
+ num syscall.Errno
|
|
|
+ name string
|
|
|
+ desc string
|
|
|
+}{
|
|
|
+ {1, "EPERM", "operation not permitted"},
|
|
|
+ {2, "ENOENT", "no such file or directory"},
|
|
|
+ {3, "ESRCH", "no such process"},
|
|
|
+ {4, "EINTR", "interrupted system call"},
|
|
|
+ {5, "EIO", "input/output error"},
|
|
|
+ {6, "ENXIO", "device not configured"},
|
|
|
+ {7, "E2BIG", "argument list too long"},
|
|
|
+ {8, "ENOEXEC", "exec format error"},
|
|
|
+ {9, "EBADF", "bad file descriptor"},
|
|
|
+ {10, "ECHILD", "no child processes"},
|
|
|
+ {11, "EDEADLK", "resource deadlock avoided"},
|
|
|
+ {12, "ENOMEM", "cannot allocate memory"},
|
|
|
+ {13, "EACCES", "permission denied"},
|
|
|
+ {14, "EFAULT", "bad address"},
|
|
|
+ {15, "ENOTBLK", "block device required"},
|
|
|
+ {16, "EBUSY", "resource busy"},
|
|
|
+ {17, "EEXIST", "file exists"},
|
|
|
+ {18, "EXDEV", "cross-device link"},
|
|
|
+ {19, "ENODEV", "operation not supported by device"},
|
|
|
+ {20, "ENOTDIR", "not a directory"},
|
|
|
+ {21, "EISDIR", "is a directory"},
|
|
|
+ {22, "EINVAL", "invalid argument"},
|
|
|
+ {23, "ENFILE", "too many open files in system"},
|
|
|
+ {24, "EMFILE", "too many open files"},
|
|
|
+ {25, "ENOTTY", "inappropriate ioctl for device"},
|
|
|
+ {26, "ETXTBSY", "text file busy"},
|
|
|
+ {27, "EFBIG", "file too large"},
|
|
|
+ {28, "ENOSPC", "no space left on device"},
|
|
|
+ {29, "ESPIPE", "illegal seek"},
|
|
|
+ {30, "EROFS", "read-only file system"},
|
|
|
+ {31, "EMLINK", "too many links"},
|
|
|
+ {32, "EPIPE", "broken pipe"},
|
|
|
+ {33, "EDOM", "numerical argument out of domain"},
|
|
|
+ {34, "ERANGE", "result too large"},
|
|
|
+ {35, "EAGAIN", "resource temporarily unavailable"},
|
|
|
+ {36, "EINPROGRESS", "operation now in progress"},
|
|
|
+ {37, "EALREADY", "operation already in progress"},
|
|
|
+ {38, "ENOTSOCK", "socket operation on non-socket"},
|
|
|
+ {39, "EDESTADDRREQ", "destination address required"},
|
|
|
+ {40, "EMSGSIZE", "message too long"},
|
|
|
+ {41, "EPROTOTYPE", "protocol wrong type for socket"},
|
|
|
+ {42, "ENOPROTOOPT", "protocol not available"},
|
|
|
+ {43, "EPROTONOSUPPORT", "protocol not supported"},
|
|
|
+ {44, "ESOCKTNOSUPPORT", "socket type not supported"},
|
|
|
+ {45, "ENOTSUP", "operation not supported"},
|
|
|
+ {46, "EPFNOSUPPORT", "protocol family not supported"},
|
|
|
+ {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
|
|
|
+ {48, "EADDRINUSE", "address already in use"},
|
|
|
+ {49, "EADDRNOTAVAIL", "can't assign requested address"},
|
|
|
+ {50, "ENETDOWN", "network is down"},
|
|
|
+ {51, "ENETUNREACH", "network is unreachable"},
|
|
|
+ {52, "ENETRESET", "network dropped connection on reset"},
|
|
|
+ {53, "ECONNABORTED", "software caused connection abort"},
|
|
|
+ {54, "ECONNRESET", "connection reset by peer"},
|
|
|
+ {55, "ENOBUFS", "no buffer space available"},
|
|
|
+ {56, "EISCONN", "socket is already connected"},
|
|
|
+ {57, "ENOTCONN", "socket is not connected"},
|
|
|
+ {58, "ESHUTDOWN", "can't send after socket shutdown"},
|
|
|
+ {59, "ETOOMANYREFS", "too many references: can't splice"},
|
|
|
+ {60, "ETIMEDOUT", "operation timed out"},
|
|
|
+ {61, "ECONNREFUSED", "connection refused"},
|
|
|
+ {62, "ELOOP", "too many levels of symbolic links"},
|
|
|
+ {63, "ENAMETOOLONG", "file name too long"},
|
|
|
+ {64, "EHOSTDOWN", "host is down"},
|
|
|
+ {65, "EHOSTUNREACH", "no route to host"},
|
|
|
+ {66, "ENOTEMPTY", "directory not empty"},
|
|
|
+ {67, "EPROCLIM", "too many processes"},
|
|
|
+ {68, "EUSERS", "too many users"},
|
|
|
+ {69, "EDQUOT", "disc quota exceeded"},
|
|
|
+ {70, "ESTALE", "stale NFS file handle"},
|
|
|
+ {71, "EREMOTE", "too many levels of remote in path"},
|
|
|
+ {72, "EBADRPC", "RPC struct is bad"},
|
|
|
+ {73, "ERPCMISMATCH", "RPC version wrong"},
|
|
|
+ {74, "EPROGUNAVAIL", "RPC prog. not avail"},
|
|
|
+ {75, "EPROGMISMATCH", "program version wrong"},
|
|
|
+ {76, "EPROCUNAVAIL", "bad procedure for program"},
|
|
|
+ {77, "ENOLCK", "no locks available"},
|
|
|
+ {78, "ENOSYS", "function not implemented"},
|
|
|
+ {79, "EFTYPE", "inappropriate file type or format"},
|
|
|
+ {80, "EAUTH", "authentication error"},
|
|
|
+ {81, "ENEEDAUTH", "need authenticator"},
|
|
|
+ {82, "EPWROFF", "device power is off"},
|
|
|
+ {83, "EDEVERR", "device error"},
|
|
|
+ {84, "EOVERFLOW", "value too large to be stored in data type"},
|
|
|
+ {85, "EBADEXEC", "bad executable (or shared library)"},
|
|
|
+ {86, "EBADARCH", "bad CPU type in executable"},
|
|
|
+ {87, "ESHLIBVERS", "shared library version mismatch"},
|
|
|
+ {88, "EBADMACHO", "malformed Mach-o file"},
|
|
|
+ {89, "ECANCELED", "operation canceled"},
|
|
|
+ {90, "EIDRM", "identifier removed"},
|
|
|
+ {91, "ENOMSG", "no message of desired type"},
|
|
|
+ {92, "EILSEQ", "illegal byte sequence"},
|
|
|
+ {93, "ENOATTR", "attribute not found"},
|
|
|
+ {94, "EBADMSG", "bad message"},
|
|
|
+ {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
|
|
|
+ {96, "ENODATA", "no message available on STREAM"},
|
|
|
+ {97, "ENOLINK", "ENOLINK (Reserved)"},
|
|
|
+ {98, "ENOSR", "no STREAM resources"},
|
|
|
+ {99, "ENOSTR", "not a STREAM"},
|
|
|
+ {100, "EPROTO", "protocol error"},
|
|
|
+ {101, "ETIME", "STREAM ioctl timeout"},
|
|
|
+ {102, "EOPNOTSUPP", "operation not supported on socket"},
|
|
|
+ {103, "ENOPOLICY", "policy not found"},
|
|
|
+ {104, "ENOTRECOVERABLE", "state not recoverable"},
|
|
|
+ {105, "EOWNERDEAD", "previous owner died"},
|
|
|
+ {106, "EQFULL", "interface output queue is full"},
|
|
|
}
|
|
|
|
|
|
// Signal table
|
|
|
-var signals = [...]string{
|
|
|
- 1: "hangup",
|
|
|
- 2: "interrupt",
|
|
|
- 3: "quit",
|
|
|
- 4: "illegal instruction",
|
|
|
- 5: "trace/BPT trap",
|
|
|
- 6: "abort trap",
|
|
|
- 7: "EMT trap",
|
|
|
- 8: "floating point exception",
|
|
|
- 9: "killed",
|
|
|
- 10: "bus error",
|
|
|
- 11: "segmentation fault",
|
|
|
- 12: "bad system call",
|
|
|
- 13: "broken pipe",
|
|
|
- 14: "alarm clock",
|
|
|
- 15: "terminated",
|
|
|
- 16: "urgent I/O condition",
|
|
|
- 17: "suspended (signal)",
|
|
|
- 18: "suspended",
|
|
|
- 19: "continued",
|
|
|
- 20: "child exited",
|
|
|
- 21: "stopped (tty input)",
|
|
|
- 22: "stopped (tty output)",
|
|
|
- 23: "I/O possible",
|
|
|
- 24: "cputime limit exceeded",
|
|
|
- 25: "filesize limit exceeded",
|
|
|
- 26: "virtual timer expired",
|
|
|
- 27: "profiling timer expired",
|
|
|
- 28: "window size changes",
|
|
|
- 29: "information request",
|
|
|
- 30: "user defined signal 1",
|
|
|
- 31: "user defined signal 2",
|
|
|
+var signalList = [...]struct {
|
|
|
+ num syscall.Signal
|
|
|
+ name string
|
|
|
+ desc string
|
|
|
+}{
|
|
|
+ {1, "SIGHUP", "hangup"},
|
|
|
+ {2, "SIGINT", "interrupt"},
|
|
|
+ {3, "SIGQUIT", "quit"},
|
|
|
+ {4, "SIGILL", "illegal instruction"},
|
|
|
+ {5, "SIGTRAP", "trace/BPT trap"},
|
|
|
+ {6, "SIGABRT", "abort trap"},
|
|
|
+ {7, "SIGEMT", "EMT trap"},
|
|
|
+ {8, "SIGFPE", "floating point exception"},
|
|
|
+ {9, "SIGKILL", "killed"},
|
|
|
+ {10, "SIGBUS", "bus error"},
|
|
|
+ {11, "SIGSEGV", "segmentation fault"},
|
|
|
+ {12, "SIGSYS", "bad system call"},
|
|
|
+ {13, "SIGPIPE", "broken pipe"},
|
|
|
+ {14, "SIGALRM", "alarm clock"},
|
|
|
+ {15, "SIGTERM", "terminated"},
|
|
|
+ {16, "SIGURG", "urgent I/O condition"},
|
|
|
+ {17, "SIGSTOP", "suspended (signal)"},
|
|
|
+ {18, "SIGTSTP", "suspended"},
|
|
|
+ {19, "SIGCONT", "continued"},
|
|
|
+ {20, "SIGCHLD", "child exited"},
|
|
|
+ {21, "SIGTTIN", "stopped (tty input)"},
|
|
|
+ {22, "SIGTTOU", "stopped (tty output)"},
|
|
|
+ {23, "SIGIO", "I/O possible"},
|
|
|
+ {24, "SIGXCPU", "cputime limit exceeded"},
|
|
|
+ {25, "SIGXFSZ", "filesize limit exceeded"},
|
|
|
+ {26, "SIGVTALRM", "virtual timer expired"},
|
|
|
+ {27, "SIGPROF", "profiling timer expired"},
|
|
|
+ {28, "SIGWINCH", "window size changes"},
|
|
|
+ {29, "SIGINFO", "information request"},
|
|
|
+ {30, "SIGUSR1", "user defined signal 1"},
|
|
|
+ {31, "SIGUSR2", "user defined signal 2"},
|
|
|
}
|