wasmux
Version:
WebAssembly toolchain for compiling libc and kernel into system-level WASM modules
71 lines (69 loc) • 3.47 kB
JavaScript
const E = (code, description) => { return { code, description } };
module.exports.success = E(0, "No error information");
module.exports.errors = {
EPERM: E(1, "Operation not permitted"),
ENOENT: E(2, "No such file or directory"),
ESRCH: E(3, "No such process"),
EINTR: E(4, "Interrupted function call"),
EIO: E(5, "Input/output error"),
ENXIO: E(6, "No such device or address"),
E2BIG: E(7, "Argument list too long"),
ENOEXEC: E(8, "Exec format error"),
EBADF: E(9, "Bad file descriptor"),
ECHILD: E(10, "No child processes"),
EAGAIN: E(11, "Resource temporarily unavailable"),
ENOMEM: E(12, "Out of memory"),
EACCES: E(13, "Permission denied"),
EFAULT: E(14, "Bad address error"),
EBUSY: E(16, "Device or resource busy"),
EEXIST: E(17, "File exists"),
EXDEV: E(18, "Invalid cross-device link"),
ENODEV: E(19, "No such device"),
ENOTDIR: E(20, "Not a directory"),
EISDIR: E(21, "Is a directory"),
EINVAL: E(22, "Invalid argument"),
ENFILE: E(23, "File table overflow"),
EMFILE: E(24, "Too many open files"),
ENOTTY: E(25, "Inappropriate I/O control operation"),
ETXTBSY: E(26, "Text file busy"),
EFBIG: E(27, "File too large"),
ENOSPC: E(28, "No space left on device"),
ESPIPE: E(29, "Invalid seek"),
EROFS: E(30, "Read-only filesystem"),
EMLINK: E(31, "Too many links"),
EPIPE: E(32, "Broken pipe"),
EDOM: E(33, "Mathematics argument out of domain of function"),
ERANGE: E(34, "Math result not representable"),
ENAMETOOLONG: E(36, "Filename too long"),
ENOLCK: E(37, "No locks available"),
ENOSYS: E(38, "Function not implemented"),
ENOTEMPTY: E(39, "Directory not empty"),
ELOOP: E(40, "Too many levels of symbolic links"),
ENOMSG: E(42, "No message of the desired type"),
EOVERFLOW: E(75, "Value too large to be stored in data type"),
EILSEQ: E(84, "Invalid or incomplete multibyte or wide character"),
ENODATA: E(86, "The named attribute does not exist"),
ENOTSOCK: E(88, "Not a socket"),
EMSGSIZE: E(90, "Message too long"),
EOPNOTSUPP: E(95, "Operation not supported on socket"),
EAFNOSUPPORT: E(97, "Address family not supported"),
EADDRINUSE: E(98, "Address already in use"),
EADDRNOTAVAIL: E(99, "Address not available"),
ECONNABORTED: E(103, "Connection aborted"),
ECONNRESET: E(104, "Connection reset"),
ENOBUFS: E(105, "No buffer space available"),
EISCONN: E(106, "Socket is connected"),
ENOTCONN: E(107, "The socket is not connected"),
ETIMEDOUT: E(110, "Connection timed out"),
ECONNREFUSED: E(111, "Connection refused"),
EINPROGRESS: E(115, "Operation in progress"),
ESTALE: E(116, "Stale file handle"),
EDQUOT: E(122, "Disk quota exceeded"),
ECANCELED: E(125, "Operation canceled"),
EOWNERDEAD: E(130, "Owner died"),
};
module.exports.aliases = {
ENOTSUP: "EOPNOTSUPP",
ENOATTR: "ENODATA",
EWOULDBLOCK: "EAGAIN",
};