diff options
Diffstat (limited to 'lib9p')
-rw-r--r-- | lib9p/core_generated.c | 393 | ||||
-rw-r--r-- | lib9p/core_include/lib9p/_core_generated.h | 133 | ||||
-rw-r--r-- | lib9p/core_include/lib9p/core.h | 1 | ||||
-rw-r--r-- | lib9p/core_include/lib9p/linux-errno.h | 139 | ||||
-rwxr-xr-x | lib9p/core_include/lib9p/linux-errno.h.gen | 38 | ||||
-rw-r--r-- | lib9p/idl/2010-9P2000.L.9p | 141 | ||||
-rwxr-xr-x | lib9p/idl/2010-9P2000.L.9p.gen | 282 | ||||
-rw-r--r-- | lib9p/idl/__init__.py | 6 | ||||
-rw-r--r-- | lib9p/tests/test_compile.c | 131 | ||||
-rw-r--r-- | lib9p/tests/testclient-p9p.explog | 12 | ||||
-rw-r--r-- | lib9p/tests/testclient-sess.explog | 2 |
11 files changed, 1091 insertions, 187 deletions
diff --git a/lib9p/core_generated.c b/lib9p/core_generated.c index 0606373..1789bdc 100644 --- a/lib9p/core_generated.c +++ b/lib9p/core_generated.c @@ -5456,6 +5456,399 @@ static void lib9p_errno_format(lib9p_errno_t *self, struct fmt_state *state) { case LIB9P_ERRNO_NOERROR: fmt_state_puts(state, "NOERROR"); break; + case LIB9P_ERRNO_L_EPERM: + fmt_state_puts(state, "L_EPERM"); + break; + case LIB9P_ERRNO_L_ENOENT: + fmt_state_puts(state, "L_ENOENT"); + break; + case LIB9P_ERRNO_L_ESRCH: + fmt_state_puts(state, "L_ESRCH"); + break; + case LIB9P_ERRNO_L_EINTR: + fmt_state_puts(state, "L_EINTR"); + break; + case LIB9P_ERRNO_L_EIO: + fmt_state_puts(state, "L_EIO"); + break; + case LIB9P_ERRNO_L_ENXIO: + fmt_state_puts(state, "L_ENXIO"); + break; + case LIB9P_ERRNO_L_E2BIG: + fmt_state_puts(state, "L_E2BIG"); + break; + case LIB9P_ERRNO_L_ENOEXEC: + fmt_state_puts(state, "L_ENOEXEC"); + break; + case LIB9P_ERRNO_L_EBADF: + fmt_state_puts(state, "L_EBADF"); + break; + case LIB9P_ERRNO_L_ECHILD: + fmt_state_puts(state, "L_ECHILD"); + break; + case LIB9P_ERRNO_L_EAGAIN: + fmt_state_puts(state, "L_EAGAIN"); + break; + case LIB9P_ERRNO_L_ENOMEM: + fmt_state_puts(state, "L_ENOMEM"); + break; + case LIB9P_ERRNO_L_EACCES: + fmt_state_puts(state, "L_EACCES"); + break; + case LIB9P_ERRNO_L_EFAULT: + fmt_state_puts(state, "L_EFAULT"); + break; + case LIB9P_ERRNO_L_ENOTBLK: + fmt_state_puts(state, "L_ENOTBLK"); + break; + case LIB9P_ERRNO_L_EBUSY: + fmt_state_puts(state, "L_EBUSY"); + break; + case LIB9P_ERRNO_L_EEXIST: + fmt_state_puts(state, "L_EEXIST"); + break; + case LIB9P_ERRNO_L_EXDEV: + fmt_state_puts(state, "L_EXDEV"); + break; + case LIB9P_ERRNO_L_ENODEV: + fmt_state_puts(state, "L_ENODEV"); + break; + case LIB9P_ERRNO_L_ENOTDIR: + fmt_state_puts(state, "L_ENOTDIR"); + break; + case LIB9P_ERRNO_L_EISDIR: + fmt_state_puts(state, "L_EISDIR"); + break; + case LIB9P_ERRNO_L_EINVAL: + fmt_state_puts(state, "L_EINVAL"); + break; + case LIB9P_ERRNO_L_ENFILE: + fmt_state_puts(state, "L_ENFILE"); + break; + case LIB9P_ERRNO_L_EMFILE: + fmt_state_puts(state, "L_EMFILE"); + break; + case LIB9P_ERRNO_L_ENOTTY: + fmt_state_puts(state, "L_ENOTTY"); + break; + case LIB9P_ERRNO_L_ETXTBSY: + fmt_state_puts(state, "L_ETXTBSY"); + break; + case LIB9P_ERRNO_L_EFBIG: + fmt_state_puts(state, "L_EFBIG"); + break; + case LIB9P_ERRNO_L_ENOSPC: + fmt_state_puts(state, "L_ENOSPC"); + break; + case LIB9P_ERRNO_L_ESPIPE: + fmt_state_puts(state, "L_ESPIPE"); + break; + case LIB9P_ERRNO_L_EROFS: + fmt_state_puts(state, "L_EROFS"); + break; + case LIB9P_ERRNO_L_EMLINK: + fmt_state_puts(state, "L_EMLINK"); + break; + case LIB9P_ERRNO_L_EPIPE: + fmt_state_puts(state, "L_EPIPE"); + break; + case LIB9P_ERRNO_L_EDOM: + fmt_state_puts(state, "L_EDOM"); + break; + case LIB9P_ERRNO_L_ERANGE: + fmt_state_puts(state, "L_ERANGE"); + break; + case LIB9P_ERRNO_L_EDEADLK: + fmt_state_puts(state, "L_EDEADLK"); + break; + case LIB9P_ERRNO_L_ENAMETOOLONG: + fmt_state_puts(state, "L_ENAMETOOLONG"); + break; + case LIB9P_ERRNO_L_ENOLCK: + fmt_state_puts(state, "L_ENOLCK"); + break; + case LIB9P_ERRNO_L_ENOSYS: + fmt_state_puts(state, "L_ENOSYS"); + break; + case LIB9P_ERRNO_L_ENOTEMPTY: + fmt_state_puts(state, "L_ENOTEMPTY"); + break; + case LIB9P_ERRNO_L_ELOOP: + fmt_state_puts(state, "L_ELOOP"); + break; + case LIB9P_ERRNO_L_ENOMSG: + fmt_state_puts(state, "L_ENOMSG"); + break; + case LIB9P_ERRNO_L_EIDRM: + fmt_state_puts(state, "L_EIDRM"); + break; + case LIB9P_ERRNO_L_ECHRNG: + fmt_state_puts(state, "L_ECHRNG"); + break; + case LIB9P_ERRNO_L_EL2NSYNC: + fmt_state_puts(state, "L_EL2NSYNC"); + break; + case LIB9P_ERRNO_L_EL3HLT: + fmt_state_puts(state, "L_EL3HLT"); + break; + case LIB9P_ERRNO_L_EL3RST: + fmt_state_puts(state, "L_EL3RST"); + break; + case LIB9P_ERRNO_L_ELNRNG: + fmt_state_puts(state, "L_ELNRNG"); + break; + case LIB9P_ERRNO_L_EUNATCH: + fmt_state_puts(state, "L_EUNATCH"); + break; + case LIB9P_ERRNO_L_ENOCSI: + fmt_state_puts(state, "L_ENOCSI"); + break; + case LIB9P_ERRNO_L_EL2HLT: + fmt_state_puts(state, "L_EL2HLT"); + break; + case LIB9P_ERRNO_L_EBADE: + fmt_state_puts(state, "L_EBADE"); + break; + case LIB9P_ERRNO_L_EBADR: + fmt_state_puts(state, "L_EBADR"); + break; + case LIB9P_ERRNO_L_EXFULL: + fmt_state_puts(state, "L_EXFULL"); + break; + case LIB9P_ERRNO_L_ENOANO: + fmt_state_puts(state, "L_ENOANO"); + break; + case LIB9P_ERRNO_L_EBADRQC: + fmt_state_puts(state, "L_EBADRQC"); + break; + case LIB9P_ERRNO_L_EBADSLT: + fmt_state_puts(state, "L_EBADSLT"); + break; + case LIB9P_ERRNO_L_EBFONT: + fmt_state_puts(state, "L_EBFONT"); + break; + case LIB9P_ERRNO_L_ENOSTR: + fmt_state_puts(state, "L_ENOSTR"); + break; + case LIB9P_ERRNO_L_ENODATA: + fmt_state_puts(state, "L_ENODATA"); + break; + case LIB9P_ERRNO_L_ETIME: + fmt_state_puts(state, "L_ETIME"); + break; + case LIB9P_ERRNO_L_ENOSR: + fmt_state_puts(state, "L_ENOSR"); + break; + case LIB9P_ERRNO_L_ENONET: + fmt_state_puts(state, "L_ENONET"); + break; + case LIB9P_ERRNO_L_ENOPKG: + fmt_state_puts(state, "L_ENOPKG"); + break; + case LIB9P_ERRNO_L_EREMOTE: + fmt_state_puts(state, "L_EREMOTE"); + break; + case LIB9P_ERRNO_L_ENOLINK: + fmt_state_puts(state, "L_ENOLINK"); + break; + case LIB9P_ERRNO_L_EADV: + fmt_state_puts(state, "L_EADV"); + break; + case LIB9P_ERRNO_L_ESRMNT: + fmt_state_puts(state, "L_ESRMNT"); + break; + case LIB9P_ERRNO_L_ECOMM: + fmt_state_puts(state, "L_ECOMM"); + break; + case LIB9P_ERRNO_L_EPROTO: + fmt_state_puts(state, "L_EPROTO"); + break; + case LIB9P_ERRNO_L_EMULTIHOP: + fmt_state_puts(state, "L_EMULTIHOP"); + break; + case LIB9P_ERRNO_L_EDOTDOT: + fmt_state_puts(state, "L_EDOTDOT"); + break; + case LIB9P_ERRNO_L_EBADMSG: + fmt_state_puts(state, "L_EBADMSG"); + break; + case LIB9P_ERRNO_L_EOVERFLOW: + fmt_state_puts(state, "L_EOVERFLOW"); + break; + case LIB9P_ERRNO_L_ENOTUNIQ: + fmt_state_puts(state, "L_ENOTUNIQ"); + break; + case LIB9P_ERRNO_L_EBADFD: + fmt_state_puts(state, "L_EBADFD"); + break; + case LIB9P_ERRNO_L_EREMCHG: + fmt_state_puts(state, "L_EREMCHG"); + break; + case LIB9P_ERRNO_L_ELIBACC: + fmt_state_puts(state, "L_ELIBACC"); + break; + case LIB9P_ERRNO_L_ELIBBAD: + fmt_state_puts(state, "L_ELIBBAD"); + break; + case LIB9P_ERRNO_L_ELIBSCN: + fmt_state_puts(state, "L_ELIBSCN"); + break; + case LIB9P_ERRNO_L_ELIBMAX: + fmt_state_puts(state, "L_ELIBMAX"); + break; + case LIB9P_ERRNO_L_ELIBEXEC: + fmt_state_puts(state, "L_ELIBEXEC"); + break; + case LIB9P_ERRNO_L_EILSEQ: + fmt_state_puts(state, "L_EILSEQ"); + break; + case LIB9P_ERRNO_L_ERESTART: + fmt_state_puts(state, "L_ERESTART"); + break; + case LIB9P_ERRNO_L_ESTRPIPE: + fmt_state_puts(state, "L_ESTRPIPE"); + break; + case LIB9P_ERRNO_L_EUSERS: + fmt_state_puts(state, "L_EUSERS"); + break; + case LIB9P_ERRNO_L_ENOTSOCK: + fmt_state_puts(state, "L_ENOTSOCK"); + break; + case LIB9P_ERRNO_L_EDESTADDRREQ: + fmt_state_puts(state, "L_EDESTADDRREQ"); + break; + case LIB9P_ERRNO_L_EMSGSIZE: + fmt_state_puts(state, "L_EMSGSIZE"); + break; + case LIB9P_ERRNO_L_EPROTOTYPE: + fmt_state_puts(state, "L_EPROTOTYPE"); + break; + case LIB9P_ERRNO_L_ENOPROTOOPT: + fmt_state_puts(state, "L_ENOPROTOOPT"); + break; + case LIB9P_ERRNO_L_EPROTONOSUPPORT: + fmt_state_puts(state, "L_EPROTONOSUPPORT"); + break; + case LIB9P_ERRNO_L_ESOCKTNOSUPPORT: + fmt_state_puts(state, "L_ESOCKTNOSUPPORT"); + break; + case LIB9P_ERRNO_L_EOPNOTSUPP: + fmt_state_puts(state, "L_EOPNOTSUPP"); + break; + case LIB9P_ERRNO_L_EPFNOSUPPORT: + fmt_state_puts(state, "L_EPFNOSUPPORT"); + break; + case LIB9P_ERRNO_L_EAFNOSUPPORT: + fmt_state_puts(state, "L_EAFNOSUPPORT"); + break; + case LIB9P_ERRNO_L_EADDRINUSE: + fmt_state_puts(state, "L_EADDRINUSE"); + break; + case LIB9P_ERRNO_L_EADDRNOTAVAIL: + fmt_state_puts(state, "L_EADDRNOTAVAIL"); + break; + case LIB9P_ERRNO_L_ENETDOWN: + fmt_state_puts(state, "L_ENETDOWN"); + break; + case LIB9P_ERRNO_L_ENETUNREACH: + fmt_state_puts(state, "L_ENETUNREACH"); + break; + case LIB9P_ERRNO_L_ENETRESET: + fmt_state_puts(state, "L_ENETRESET"); + break; + case LIB9P_ERRNO_L_ECONNABORTED: + fmt_state_puts(state, "L_ECONNABORTED"); + break; + case LIB9P_ERRNO_L_ECONNRESET: + fmt_state_puts(state, "L_ECONNRESET"); + break; + case LIB9P_ERRNO_L_ENOBUFS: + fmt_state_puts(state, "L_ENOBUFS"); + break; + case LIB9P_ERRNO_L_EISCONN: + fmt_state_puts(state, "L_EISCONN"); + break; + case LIB9P_ERRNO_L_ENOTCONN: + fmt_state_puts(state, "L_ENOTCONN"); + break; + case LIB9P_ERRNO_L_ESHUTDOWN: + fmt_state_puts(state, "L_ESHUTDOWN"); + break; + case LIB9P_ERRNO_L_ETOOMANYREFS: + fmt_state_puts(state, "L_ETOOMANYREFS"); + break; + case LIB9P_ERRNO_L_ETIMEDOUT: + fmt_state_puts(state, "L_ETIMEDOUT"); + break; + case LIB9P_ERRNO_L_ECONNREFUSED: + fmt_state_puts(state, "L_ECONNREFUSED"); + break; + case LIB9P_ERRNO_L_EHOSTDOWN: + fmt_state_puts(state, "L_EHOSTDOWN"); + break; + case LIB9P_ERRNO_L_EHOSTUNREACH: + fmt_state_puts(state, "L_EHOSTUNREACH"); + break; + case LIB9P_ERRNO_L_EALREADY: + fmt_state_puts(state, "L_EALREADY"); + break; + case LIB9P_ERRNO_L_EINPROGRESS: + fmt_state_puts(state, "L_EINPROGRESS"); + break; + case LIB9P_ERRNO_L_ESTALE: + fmt_state_puts(state, "L_ESTALE"); + break; + case LIB9P_ERRNO_L_EUCLEAN: + fmt_state_puts(state, "L_EUCLEAN"); + break; + case LIB9P_ERRNO_L_ENOTNAM: + fmt_state_puts(state, "L_ENOTNAM"); + break; + case LIB9P_ERRNO_L_ENAVAIL: + fmt_state_puts(state, "L_ENAVAIL"); + break; + case LIB9P_ERRNO_L_EISNAM: + fmt_state_puts(state, "L_EISNAM"); + break; + case LIB9P_ERRNO_L_EREMOTEIO: + fmt_state_puts(state, "L_EREMOTEIO"); + break; + case LIB9P_ERRNO_L_EDQUOT: + fmt_state_puts(state, "L_EDQUOT"); + break; + case LIB9P_ERRNO_L_ENOMEDIUM: + fmt_state_puts(state, "L_ENOMEDIUM"); + break; + case LIB9P_ERRNO_L_EMEDIUMTYPE: + fmt_state_puts(state, "L_EMEDIUMTYPE"); + break; + case LIB9P_ERRNO_L_ECANCELED: + fmt_state_puts(state, "L_ECANCELED"); + break; + case LIB9P_ERRNO_L_ENOKEY: + fmt_state_puts(state, "L_ENOKEY"); + break; + case LIB9P_ERRNO_L_EKEYEXPIRED: + fmt_state_puts(state, "L_EKEYEXPIRED"); + break; + case LIB9P_ERRNO_L_EKEYREVOKED: + fmt_state_puts(state, "L_EKEYREVOKED"); + break; + case LIB9P_ERRNO_L_EKEYREJECTED: + fmt_state_puts(state, "L_EKEYREJECTED"); + break; + case LIB9P_ERRNO_L_EOWNERDEAD: + fmt_state_puts(state, "L_EOWNERDEAD"); + break; + case LIB9P_ERRNO_L_ENOTRECOVERABLE: + fmt_state_puts(state, "L_ENOTRECOVERABLE"); + break; + case LIB9P_ERRNO_L_ERFKILL: + fmt_state_puts(state, "L_ERFKILL"); + break; + case LIB9P_ERRNO_L_EHWPOISON: + fmt_state_puts(state, "L_EHWPOISON"); + break; default: fmt_state_printf(state, "%"PRIu32, *self); } diff --git a/lib9p/core_include/lib9p/_core_generated.h b/lib9p/core_include/lib9p/_core_generated.h index 33514b9..68eb636 100644 --- a/lib9p/core_include/lib9p/_core_generated.h +++ b/lib9p/core_include/lib9p/_core_generated.h @@ -271,7 +271,138 @@ LO_IMPLEMENTATION_H(fmt_formatter, lib9p_nuid_t, lib9p_nuid); /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_errno_t; LO_IMPLEMENTATION_H(fmt_formatter, lib9p_errno_t, lib9p_errno); -#define LIB9P_ERRNO_NOERROR ((lib9p_errno_t)(0)) +#define LIB9P_ERRNO_NOERROR ((lib9p_errno_t)(0)) +#define LIB9P_ERRNO_L_EPERM ((lib9p_errno_t)(1)) +#define LIB9P_ERRNO_L_ENOENT ((lib9p_errno_t)(2)) +#define LIB9P_ERRNO_L_ESRCH ((lib9p_errno_t)(3)) +#define LIB9P_ERRNO_L_EINTR ((lib9p_errno_t)(4)) +#define LIB9P_ERRNO_L_EIO ((lib9p_errno_t)(5)) +#define LIB9P_ERRNO_L_ENXIO ((lib9p_errno_t)(6)) +#define LIB9P_ERRNO_L_E2BIG ((lib9p_errno_t)(7)) +#define LIB9P_ERRNO_L_ENOEXEC ((lib9p_errno_t)(8)) +#define LIB9P_ERRNO_L_EBADF ((lib9p_errno_t)(9)) +#define LIB9P_ERRNO_L_ECHILD ((lib9p_errno_t)(10)) +#define LIB9P_ERRNO_L_EAGAIN ((lib9p_errno_t)(11)) +#define LIB9P_ERRNO_L_ENOMEM ((lib9p_errno_t)(12)) +#define LIB9P_ERRNO_L_EACCES ((lib9p_errno_t)(13)) +#define LIB9P_ERRNO_L_EFAULT ((lib9p_errno_t)(14)) +#define LIB9P_ERRNO_L_ENOTBLK ((lib9p_errno_t)(15)) +#define LIB9P_ERRNO_L_EBUSY ((lib9p_errno_t)(16)) +#define LIB9P_ERRNO_L_EEXIST ((lib9p_errno_t)(17)) +#define LIB9P_ERRNO_L_EXDEV ((lib9p_errno_t)(18)) +#define LIB9P_ERRNO_L_ENODEV ((lib9p_errno_t)(19)) +#define LIB9P_ERRNO_L_ENOTDIR ((lib9p_errno_t)(20)) +#define LIB9P_ERRNO_L_EISDIR ((lib9p_errno_t)(21)) +#define LIB9P_ERRNO_L_EINVAL ((lib9p_errno_t)(22)) +#define LIB9P_ERRNO_L_ENFILE ((lib9p_errno_t)(23)) +#define LIB9P_ERRNO_L_EMFILE ((lib9p_errno_t)(24)) +#define LIB9P_ERRNO_L_ENOTTY ((lib9p_errno_t)(25)) +#define LIB9P_ERRNO_L_ETXTBSY ((lib9p_errno_t)(26)) +#define LIB9P_ERRNO_L_EFBIG ((lib9p_errno_t)(27)) +#define LIB9P_ERRNO_L_ENOSPC ((lib9p_errno_t)(28)) +#define LIB9P_ERRNO_L_ESPIPE ((lib9p_errno_t)(29)) +#define LIB9P_ERRNO_L_EROFS ((lib9p_errno_t)(30)) +#define LIB9P_ERRNO_L_EMLINK ((lib9p_errno_t)(31)) +#define LIB9P_ERRNO_L_EPIPE ((lib9p_errno_t)(32)) +#define LIB9P_ERRNO_L_EDOM ((lib9p_errno_t)(33)) +#define LIB9P_ERRNO_L_ERANGE ((lib9p_errno_t)(34)) +#define LIB9P_ERRNO_L_EDEADLK ((lib9p_errno_t)(35)) +#define LIB9P_ERRNO_L_ENAMETOOLONG ((lib9p_errno_t)(36)) +#define LIB9P_ERRNO_L_ENOLCK ((lib9p_errno_t)(37)) +#define LIB9P_ERRNO_L_ENOSYS ((lib9p_errno_t)(38)) +#define LIB9P_ERRNO_L_ENOTEMPTY ((lib9p_errno_t)(39)) +#define LIB9P_ERRNO_L_ELOOP ((lib9p_errno_t)(40)) +#define LIB9P_ERRNO_L_ENOMSG ((lib9p_errno_t)(42)) +#define LIB9P_ERRNO_L_EIDRM ((lib9p_errno_t)(43)) +#define LIB9P_ERRNO_L_ECHRNG ((lib9p_errno_t)(44)) +#define LIB9P_ERRNO_L_EL2NSYNC ((lib9p_errno_t)(45)) +#define LIB9P_ERRNO_L_EL3HLT ((lib9p_errno_t)(46)) +#define LIB9P_ERRNO_L_EL3RST ((lib9p_errno_t)(47)) +#define LIB9P_ERRNO_L_ELNRNG ((lib9p_errno_t)(48)) +#define LIB9P_ERRNO_L_EUNATCH ((lib9p_errno_t)(49)) +#define LIB9P_ERRNO_L_ENOCSI ((lib9p_errno_t)(50)) +#define LIB9P_ERRNO_L_EL2HLT ((lib9p_errno_t)(51)) +#define LIB9P_ERRNO_L_EBADE ((lib9p_errno_t)(52)) +#define LIB9P_ERRNO_L_EBADR ((lib9p_errno_t)(53)) +#define LIB9P_ERRNO_L_EXFULL ((lib9p_errno_t)(54)) +#define LIB9P_ERRNO_L_ENOANO ((lib9p_errno_t)(55)) +#define LIB9P_ERRNO_L_EBADRQC ((lib9p_errno_t)(56)) +#define LIB9P_ERRNO_L_EBADSLT ((lib9p_errno_t)(57)) +#define LIB9P_ERRNO_L_EBFONT ((lib9p_errno_t)(59)) +#define LIB9P_ERRNO_L_ENOSTR ((lib9p_errno_t)(60)) +#define LIB9P_ERRNO_L_ENODATA ((lib9p_errno_t)(61)) +#define LIB9P_ERRNO_L_ETIME ((lib9p_errno_t)(62)) +#define LIB9P_ERRNO_L_ENOSR ((lib9p_errno_t)(63)) +#define LIB9P_ERRNO_L_ENONET ((lib9p_errno_t)(64)) +#define LIB9P_ERRNO_L_ENOPKG ((lib9p_errno_t)(65)) +#define LIB9P_ERRNO_L_EREMOTE ((lib9p_errno_t)(66)) +#define LIB9P_ERRNO_L_ENOLINK ((lib9p_errno_t)(67)) +#define LIB9P_ERRNO_L_EADV ((lib9p_errno_t)(68)) +#define LIB9P_ERRNO_L_ESRMNT ((lib9p_errno_t)(69)) +#define LIB9P_ERRNO_L_ECOMM ((lib9p_errno_t)(70)) +#define LIB9P_ERRNO_L_EPROTO ((lib9p_errno_t)(71)) +#define LIB9P_ERRNO_L_EMULTIHOP ((lib9p_errno_t)(72)) +#define LIB9P_ERRNO_L_EDOTDOT ((lib9p_errno_t)(73)) +#define LIB9P_ERRNO_L_EBADMSG ((lib9p_errno_t)(74)) +#define LIB9P_ERRNO_L_EOVERFLOW ((lib9p_errno_t)(75)) +#define LIB9P_ERRNO_L_ENOTUNIQ ((lib9p_errno_t)(76)) +#define LIB9P_ERRNO_L_EBADFD ((lib9p_errno_t)(77)) +#define LIB9P_ERRNO_L_EREMCHG ((lib9p_errno_t)(78)) +#define LIB9P_ERRNO_L_ELIBACC ((lib9p_errno_t)(79)) +#define LIB9P_ERRNO_L_ELIBBAD ((lib9p_errno_t)(80)) +#define LIB9P_ERRNO_L_ELIBSCN ((lib9p_errno_t)(81)) +#define LIB9P_ERRNO_L_ELIBMAX ((lib9p_errno_t)(82)) +#define LIB9P_ERRNO_L_ELIBEXEC ((lib9p_errno_t)(83)) +#define LIB9P_ERRNO_L_EILSEQ ((lib9p_errno_t)(84)) +#define LIB9P_ERRNO_L_ERESTART ((lib9p_errno_t)(85)) +#define LIB9P_ERRNO_L_ESTRPIPE ((lib9p_errno_t)(86)) +#define LIB9P_ERRNO_L_EUSERS ((lib9p_errno_t)(87)) +#define LIB9P_ERRNO_L_ENOTSOCK ((lib9p_errno_t)(88)) +#define LIB9P_ERRNO_L_EDESTADDRREQ ((lib9p_errno_t)(89)) +#define LIB9P_ERRNO_L_EMSGSIZE ((lib9p_errno_t)(90)) +#define LIB9P_ERRNO_L_EPROTOTYPE ((lib9p_errno_t)(91)) +#define LIB9P_ERRNO_L_ENOPROTOOPT ((lib9p_errno_t)(92)) +#define LIB9P_ERRNO_L_EPROTONOSUPPORT ((lib9p_errno_t)(93)) +#define LIB9P_ERRNO_L_ESOCKTNOSUPPORT ((lib9p_errno_t)(94)) +#define LIB9P_ERRNO_L_EOPNOTSUPP ((lib9p_errno_t)(95)) +#define LIB9P_ERRNO_L_EPFNOSUPPORT ((lib9p_errno_t)(96)) +#define LIB9P_ERRNO_L_EAFNOSUPPORT ((lib9p_errno_t)(97)) +#define LIB9P_ERRNO_L_EADDRINUSE ((lib9p_errno_t)(98)) +#define LIB9P_ERRNO_L_EADDRNOTAVAIL ((lib9p_errno_t)(99)) +#define LIB9P_ERRNO_L_ENETDOWN ((lib9p_errno_t)(100)) +#define LIB9P_ERRNO_L_ENETUNREACH ((lib9p_errno_t)(101)) +#define LIB9P_ERRNO_L_ENETRESET ((lib9p_errno_t)(102)) +#define LIB9P_ERRNO_L_ECONNABORTED ((lib9p_errno_t)(103)) +#define LIB9P_ERRNO_L_ECONNRESET ((lib9p_errno_t)(104)) +#define LIB9P_ERRNO_L_ENOBUFS ((lib9p_errno_t)(105)) +#define LIB9P_ERRNO_L_EISCONN ((lib9p_errno_t)(106)) +#define LIB9P_ERRNO_L_ENOTCONN ((lib9p_errno_t)(107)) +#define LIB9P_ERRNO_L_ESHUTDOWN ((lib9p_errno_t)(108)) +#define LIB9P_ERRNO_L_ETOOMANYREFS ((lib9p_errno_t)(109)) +#define LIB9P_ERRNO_L_ETIMEDOUT ((lib9p_errno_t)(110)) +#define LIB9P_ERRNO_L_ECONNREFUSED ((lib9p_errno_t)(111)) +#define LIB9P_ERRNO_L_EHOSTDOWN ((lib9p_errno_t)(112)) +#define LIB9P_ERRNO_L_EHOSTUNREACH ((lib9p_errno_t)(113)) +#define LIB9P_ERRNO_L_EALREADY ((lib9p_errno_t)(114)) +#define LIB9P_ERRNO_L_EINPROGRESS ((lib9p_errno_t)(115)) +#define LIB9P_ERRNO_L_ESTALE ((lib9p_errno_t)(116)) +#define LIB9P_ERRNO_L_EUCLEAN ((lib9p_errno_t)(117)) +#define LIB9P_ERRNO_L_ENOTNAM ((lib9p_errno_t)(118)) +#define LIB9P_ERRNO_L_ENAVAIL ((lib9p_errno_t)(119)) +#define LIB9P_ERRNO_L_EISNAM ((lib9p_errno_t)(120)) +#define LIB9P_ERRNO_L_EREMOTEIO ((lib9p_errno_t)(121)) +#define LIB9P_ERRNO_L_EDQUOT ((lib9p_errno_t)(122)) +#define LIB9P_ERRNO_L_ENOMEDIUM ((lib9p_errno_t)(123)) +#define LIB9P_ERRNO_L_EMEDIUMTYPE ((lib9p_errno_t)(124)) +#define LIB9P_ERRNO_L_ECANCELED ((lib9p_errno_t)(125)) +#define LIB9P_ERRNO_L_ENOKEY ((lib9p_errno_t)(126)) +#define LIB9P_ERRNO_L_EKEYEXPIRED ((lib9p_errno_t)(127)) +#define LIB9P_ERRNO_L_EKEYREVOKED ((lib9p_errno_t)(128)) +#define LIB9P_ERRNO_L_EKEYREJECTED ((lib9p_errno_t)(129)) +#define LIB9P_ERRNO_L_EOWNERDEAD ((lib9p_errno_t)(130)) +#define LIB9P_ERRNO_L_ENOTRECOVERABLE ((lib9p_errno_t)(131)) +#define LIB9P_ERRNO_L_ERFKILL ((lib9p_errno_t)(132)) +#define LIB9P_ERRNO_L_EHWPOISON ((lib9p_errno_t)(133)) #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L diff --git a/lib9p/core_include/lib9p/core.h b/lib9p/core_include/lib9p/core.h index ca779dd..ff822ed 100644 --- a/lib9p/core_include/lib9p/core.h +++ b/lib9p/core_include/lib9p/core.h @@ -12,7 +12,6 @@ #include <libmisc/assert.h> -#include <lib9p/linux-errno.h> #include <lib9p/_core_generated.h> #ifndef CONFIG_9P_MAX_ERR_SIZE diff --git a/lib9p/core_include/lib9p/linux-errno.h b/lib9p/core_include/lib9p/linux-errno.h deleted file mode 100644 index b42ba2b..0000000 --- a/lib9p/core_include/lib9p/linux-errno.h +++ /dev/null @@ -1,139 +0,0 @@ -/* lib9p/linux-errno.h - Generated by `lib9p/core_include/lib9p/linux-errno.h.gen 3rd-party/linux-errno.txt`. DO NOT EDIT! */ -/* 3rd-party/linux-errno.txt - Generated from lib9p/linux-errno.txt.gen and linux.git v6.14. DO NOT EDIT! */ - -#ifndef _LIB9P_LINUX_ERRNO_H_ -#define _LIB9P_LINUX_ERRNO_H_ - -#define LIB9P_ERRNO_L_EPERM 1 /* Operation not permitted */ -#define LIB9P_ERRNO_L_ENOENT 2 /* No such file or directory */ -#define LIB9P_ERRNO_L_ESRCH 3 /* No such process */ -#define LIB9P_ERRNO_L_EINTR 4 /* Interrupted system call */ -#define LIB9P_ERRNO_L_EIO 5 /* I/O error */ -#define LIB9P_ERRNO_L_ENXIO 6 /* No such device or address */ -#define LIB9P_ERRNO_L_E2BIG 7 /* Argument list too long */ -#define LIB9P_ERRNO_L_ENOEXEC 8 /* Exec format error */ -#define LIB9P_ERRNO_L_EBADF 9 /* Bad file number */ -#define LIB9P_ERRNO_L_ECHILD 10 /* No child processes */ -#define LIB9P_ERRNO_L_EAGAIN 11 /* Try again */ -#define LIB9P_ERRNO_L_ENOMEM 12 /* Out of memory */ -#define LIB9P_ERRNO_L_EACCES 13 /* Permission denied */ -#define LIB9P_ERRNO_L_EFAULT 14 /* Bad address */ -#define LIB9P_ERRNO_L_ENOTBLK 15 /* Block device required */ -#define LIB9P_ERRNO_L_EBUSY 16 /* Device or resource busy */ -#define LIB9P_ERRNO_L_EEXIST 17 /* File exists */ -#define LIB9P_ERRNO_L_EXDEV 18 /* Cross-device link */ -#define LIB9P_ERRNO_L_ENODEV 19 /* No such device */ -#define LIB9P_ERRNO_L_ENOTDIR 20 /* Not a directory */ -#define LIB9P_ERRNO_L_EISDIR 21 /* Is a directory */ -#define LIB9P_ERRNO_L_EINVAL 22 /* Invalid argument */ -#define LIB9P_ERRNO_L_ENFILE 23 /* File table overflow */ -#define LIB9P_ERRNO_L_EMFILE 24 /* Too many open files */ -#define LIB9P_ERRNO_L_ENOTTY 25 /* Not a typewriter */ -#define LIB9P_ERRNO_L_ETXTBSY 26 /* Text file busy */ -#define LIB9P_ERRNO_L_EFBIG 27 /* File too large */ -#define LIB9P_ERRNO_L_ENOSPC 28 /* No space left on device */ -#define LIB9P_ERRNO_L_ESPIPE 29 /* Illegal seek */ -#define LIB9P_ERRNO_L_EROFS 30 /* Read-only file system */ -#define LIB9P_ERRNO_L_EMLINK 31 /* Too many links */ -#define LIB9P_ERRNO_L_EPIPE 32 /* Broken pipe */ -#define LIB9P_ERRNO_L_EDOM 33 /* Math argument out of domain of func */ -#define LIB9P_ERRNO_L_ERANGE 34 /* Math result not representable */ -#define LIB9P_ERRNO_L_EDEADLK 35 /* Resource deadlock would occur */ -#define LIB9P_ERRNO_L_ENAMETOOLONG 36 /* File name too long */ -#define LIB9P_ERRNO_L_ENOLCK 37 /* No record locks available */ -#define LIB9P_ERRNO_L_ENOSYS 38 /* Invalid system call number */ -#define LIB9P_ERRNO_L_ENOTEMPTY 39 /* Directory not empty */ -#define LIB9P_ERRNO_L_ELOOP 40 /* Too many symbolic links encountered */ -#define LIB9P_ERRNO_L_ENOMSG 42 /* No message of desired type */ -#define LIB9P_ERRNO_L_EIDRM 43 /* Identifier removed */ -#define LIB9P_ERRNO_L_ECHRNG 44 /* Channel number out of range */ -#define LIB9P_ERRNO_L_EL2NSYNC 45 /* Level 2 not synchronized */ -#define LIB9P_ERRNO_L_EL3HLT 46 /* Level 3 halted */ -#define LIB9P_ERRNO_L_EL3RST 47 /* Level 3 reset */ -#define LIB9P_ERRNO_L_ELNRNG 48 /* Link number out of range */ -#define LIB9P_ERRNO_L_EUNATCH 49 /* Protocol driver not attached */ -#define LIB9P_ERRNO_L_ENOCSI 50 /* No CSI structure available */ -#define LIB9P_ERRNO_L_EL2HLT 51 /* Level 2 halted */ -#define LIB9P_ERRNO_L_EBADE 52 /* Invalid exchange */ -#define LIB9P_ERRNO_L_EBADR 53 /* Invalid request descriptor */ -#define LIB9P_ERRNO_L_EXFULL 54 /* Exchange full */ -#define LIB9P_ERRNO_L_ENOANO 55 /* No anode */ -#define LIB9P_ERRNO_L_EBADRQC 56 /* Invalid request code */ -#define LIB9P_ERRNO_L_EBADSLT 57 /* Invalid slot */ -#define LIB9P_ERRNO_L_EBFONT 59 /* Bad font file format */ -#define LIB9P_ERRNO_L_ENOSTR 60 /* Device not a stream */ -#define LIB9P_ERRNO_L_ENODATA 61 /* No data available */ -#define LIB9P_ERRNO_L_ETIME 62 /* Timer expired */ -#define LIB9P_ERRNO_L_ENOSR 63 /* Out of streams resources */ -#define LIB9P_ERRNO_L_ENONET 64 /* Machine is not on the network */ -#define LIB9P_ERRNO_L_ENOPKG 65 /* Package not installed */ -#define LIB9P_ERRNO_L_EREMOTE 66 /* Object is remote */ -#define LIB9P_ERRNO_L_ENOLINK 67 /* Link has been severed */ -#define LIB9P_ERRNO_L_EADV 68 /* Advertise error */ -#define LIB9P_ERRNO_L_ESRMNT 69 /* Srmount error */ -#define LIB9P_ERRNO_L_ECOMM 70 /* Communication error on send */ -#define LIB9P_ERRNO_L_EPROTO 71 /* Protocol error */ -#define LIB9P_ERRNO_L_EMULTIHOP 72 /* Multihop attempted */ -#define LIB9P_ERRNO_L_EDOTDOT 73 /* RFS specific error */ -#define LIB9P_ERRNO_L_EBADMSG 74 /* Not a data message */ -#define LIB9P_ERRNO_L_EOVERFLOW 75 /* Value too large for defined data type */ -#define LIB9P_ERRNO_L_ENOTUNIQ 76 /* Name not unique on network */ -#define LIB9P_ERRNO_L_EBADFD 77 /* File descriptor in bad state */ -#define LIB9P_ERRNO_L_EREMCHG 78 /* Remote address changed */ -#define LIB9P_ERRNO_L_ELIBACC 79 /* Can not access a needed shared library */ -#define LIB9P_ERRNO_L_ELIBBAD 80 /* Accessing a corrupted shared library */ -#define LIB9P_ERRNO_L_ELIBSCN 81 /* .lib section in a.out corrupted */ -#define LIB9P_ERRNO_L_ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define LIB9P_ERRNO_L_ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define LIB9P_ERRNO_L_EILSEQ 84 /* Illegal byte sequence */ -#define LIB9P_ERRNO_L_ERESTART 85 /* Interrupted system call should be restarted */ -#define LIB9P_ERRNO_L_ESTRPIPE 86 /* Streams pipe error */ -#define LIB9P_ERRNO_L_EUSERS 87 /* Too many users */ -#define LIB9P_ERRNO_L_ENOTSOCK 88 /* Socket operation on non-socket */ -#define LIB9P_ERRNO_L_EDESTADDRREQ 89 /* Destination address required */ -#define LIB9P_ERRNO_L_EMSGSIZE 90 /* Message too long */ -#define LIB9P_ERRNO_L_EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define LIB9P_ERRNO_L_ENOPROTOOPT 92 /* Protocol not available */ -#define LIB9P_ERRNO_L_EPROTONOSUPPORT 93 /* Protocol not supported */ -#define LIB9P_ERRNO_L_ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define LIB9P_ERRNO_L_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define LIB9P_ERRNO_L_EPFNOSUPPORT 96 /* Protocol family not supported */ -#define LIB9P_ERRNO_L_EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define LIB9P_ERRNO_L_EADDRINUSE 98 /* Address already in use */ -#define LIB9P_ERRNO_L_EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define LIB9P_ERRNO_L_ENETDOWN 100 /* Network is down */ -#define LIB9P_ERRNO_L_ENETUNREACH 101 /* Network is unreachable */ -#define LIB9P_ERRNO_L_ENETRESET 102 /* Network dropped connection because of reset */ -#define LIB9P_ERRNO_L_ECONNABORTED 103 /* Software caused connection abort */ -#define LIB9P_ERRNO_L_ECONNRESET 104 /* Connection reset by peer */ -#define LIB9P_ERRNO_L_ENOBUFS 105 /* No buffer space available */ -#define LIB9P_ERRNO_L_EISCONN 106 /* Transport endpoint is already connected */ -#define LIB9P_ERRNO_L_ENOTCONN 107 /* Transport endpoint is not connected */ -#define LIB9P_ERRNO_L_ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define LIB9P_ERRNO_L_ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define LIB9P_ERRNO_L_ETIMEDOUT 110 /* Connection timed out */ -#define LIB9P_ERRNO_L_ECONNREFUSED 111 /* Connection refused */ -#define LIB9P_ERRNO_L_EHOSTDOWN 112 /* Host is down */ -#define LIB9P_ERRNO_L_EHOSTUNREACH 113 /* No route to host */ -#define LIB9P_ERRNO_L_EALREADY 114 /* Operation already in progress */ -#define LIB9P_ERRNO_L_EINPROGRESS 115 /* Operation now in progress */ -#define LIB9P_ERRNO_L_ESTALE 116 /* Stale file handle */ -#define LIB9P_ERRNO_L_EUCLEAN 117 /* Structure needs cleaning */ -#define LIB9P_ERRNO_L_ENOTNAM 118 /* Not a XENIX named type file */ -#define LIB9P_ERRNO_L_ENAVAIL 119 /* No XENIX semaphores available */ -#define LIB9P_ERRNO_L_EISNAM 120 /* Is a named type file */ -#define LIB9P_ERRNO_L_EREMOTEIO 121 /* Remote I/O error */ -#define LIB9P_ERRNO_L_EDQUOT 122 /* Quota exceeded */ -#define LIB9P_ERRNO_L_ENOMEDIUM 123 /* No medium found */ -#define LIB9P_ERRNO_L_EMEDIUMTYPE 124 /* Wrong medium type */ -#define LIB9P_ERRNO_L_ECANCELED 125 /* Operation Canceled */ -#define LIB9P_ERRNO_L_ENOKEY 126 /* Required key not available */ -#define LIB9P_ERRNO_L_EKEYEXPIRED 127 /* Key has expired */ -#define LIB9P_ERRNO_L_EKEYREVOKED 128 /* Key has been revoked */ -#define LIB9P_ERRNO_L_EKEYREJECTED 129 /* Key was rejected by service */ -#define LIB9P_ERRNO_L_EOWNERDEAD 130 /* Owner died */ -#define LIB9P_ERRNO_L_ENOTRECOVERABLE 131 /* State not recoverable */ -#define LIB9P_ERRNO_L_ERFKILL 132 /* Operation not possible due to RF-kill */ -#define LIB9P_ERRNO_L_EHWPOISON 133 /* Memory page has hardware error */ - -#endif /* _LIB9P_LINUX_ERRNO_H_ */ diff --git a/lib9p/core_include/lib9p/linux-errno.h.gen b/lib9p/core_include/lib9p/linux-errno.h.gen deleted file mode 100755 index afc8239..0000000 --- a/lib9p/core_include/lib9p/linux-errno.h.gen +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -# lib9p/linux-errno.h.gen - Generate a C header from a list of errno numbers -# -# Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> -# SPDX-License-Identifier: AGPL-3.0-or-later - -import sys - - -def print_errnos() -> None: - print( - f"/* lib9p/linux-errno.h - Generated by `{' '.join(sys.argv)}`. DO NOT EDIT! */" - ) - errnos: dict[str, tuple[int, str]] = {} - for txtlist in sys.argv[1:]: - with open(txtlist, "r", encoding="utf-8") as fh: - for line in fh: - if line.startswith("#"): - print(f"/* {line[1:].strip()} */") - continue - _num, name, desc = line.split(maxsplit=2) - num = int(_num) - desc = desc.strip() - errnos[name] = (num, desc) - print() - print("#ifndef _LIB9P_LINUX_ERRNO_H_") - print("#define _LIB9P_LINUX_ERRNO_H_") - print() - namelen = max(len(name) for name in errnos) - numlen = max(len(str(num)) for (num, desc) in errnos.values()) - for name, [num, msg] in errnos.items(): - print(f"#define LIB9P_ERRNO_L_{name:<{namelen}} {num:>{numlen}} /* {msg} */") - print() - print("#endif /* _LIB9P_LINUX_ERRNO_H_ */") - - -if __name__ == "__main__": - print_errnos() diff --git a/lib9p/idl/2010-9P2000.L.9p b/lib9p/idl/2010-9P2000.L.9p index b88b537..5eb7d5c 100644 --- a/lib9p/idl/2010-9P2000.L.9p +++ b/lib9p/idl/2010-9P2000.L.9p @@ -1,3 +1,6 @@ +# lib9p/idl/2010-9P2000.L.9p - Generated by `lib9p/idl/2010-9P2000.L.9p.gen 3rd-party/linux-errno.txt`. DO NOT EDIT! +# 3rd-party/linux-errno.txt - Generated from lib9p/linux-errno.txt.gen and linux.git v6.14. DO NOT EDIT! + # lib9p/idl/2010-9P2000.L.9p - Definitions of 9P2000.L messages # # Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> @@ -13,8 +16,144 @@ version "9P2000.L" from ./2002-9P2000.9p import tag, fid, s, qt, qid from ./2005-9P2000.u.9p import nuid, errno +# BUG: The definitions of errno are not defined in the 9P2000.L +# protocol spec, and Linux kernel errno values vary by architecture. +# Most architectures share a "generic" list, but a handful (as of +# Linux v6.14, Alpha, MIPS, PA-RISC, PowerPC, and SPARC) have their +# own numbers. This IDL file lists the generic numbers. +# # https://github.com/chaos/diod/issues/35 -#num errno += # TODO +num errno += "L_EPERM = 1" # Operation not permitted + "L_ENOENT = 2" # No such file or directory + "L_ESRCH = 3" # No such process + "L_EINTR = 4" # Interrupted system call + "L_EIO = 5" # I/O error + "L_ENXIO = 6" # No such device or address + "L_E2BIG = 7" # Argument list too long + "L_ENOEXEC = 8" # Exec format error + "L_EBADF = 9" # Bad file number + "L_ECHILD = 10" # No child processes + "L_EAGAIN = 11" # Try again + "L_ENOMEM = 12" # Out of memory + "L_EACCES = 13" # Permission denied + "L_EFAULT = 14" # Bad address + "L_ENOTBLK = 15" # Block device required + "L_EBUSY = 16" # Device or resource busy + "L_EEXIST = 17" # File exists + "L_EXDEV = 18" # Cross-device link + "L_ENODEV = 19" # No such device + "L_ENOTDIR = 20" # Not a directory + "L_EISDIR = 21" # Is a directory + "L_EINVAL = 22" # Invalid argument + "L_ENFILE = 23" # File table overflow + "L_EMFILE = 24" # Too many open files + "L_ENOTTY = 25" # Not a typewriter + "L_ETXTBSY = 26" # Text file busy + "L_EFBIG = 27" # File too large + "L_ENOSPC = 28" # No space left on device + "L_ESPIPE = 29" # Illegal seek + "L_EROFS = 30" # Read-only file system + "L_EMLINK = 31" # Too many links + "L_EPIPE = 32" # Broken pipe + "L_EDOM = 33" # Math argument out of domain of func + "L_ERANGE = 34" # Math result not representable + "L_EDEADLK = 35" # Resource deadlock would occur + "L_ENAMETOOLONG = 36" # File name too long + "L_ENOLCK = 37" # No record locks available + "L_ENOSYS = 38" # Invalid system call number + "L_ENOTEMPTY = 39" # Directory not empty + "L_ELOOP = 40" # Too many symbolic links encountered + "L_ENOMSG = 42" # No message of desired type + "L_EIDRM = 43" # Identifier removed + "L_ECHRNG = 44" # Channel number out of range + "L_EL2NSYNC = 45" # Level 2 not synchronized + "L_EL3HLT = 46" # Level 3 halted + "L_EL3RST = 47" # Level 3 reset + "L_ELNRNG = 48" # Link number out of range + "L_EUNATCH = 49" # Protocol driver not attached + "L_ENOCSI = 50" # No CSI structure available + "L_EL2HLT = 51" # Level 2 halted + "L_EBADE = 52" # Invalid exchange + "L_EBADR = 53" # Invalid request descriptor + "L_EXFULL = 54" # Exchange full + "L_ENOANO = 55" # No anode + "L_EBADRQC = 56" # Invalid request code + "L_EBADSLT = 57" # Invalid slot + "L_EBFONT = 59" # Bad font file format + "L_ENOSTR = 60" # Device not a stream + "L_ENODATA = 61" # No data available + "L_ETIME = 62" # Timer expired + "L_ENOSR = 63" # Out of streams resources + "L_ENONET = 64" # Machine is not on the network + "L_ENOPKG = 65" # Package not installed + "L_EREMOTE = 66" # Object is remote + "L_ENOLINK = 67" # Link has been severed + "L_EADV = 68" # Advertise error + "L_ESRMNT = 69" # Srmount error + "L_ECOMM = 70" # Communication error on send + "L_EPROTO = 71" # Protocol error + "L_EMULTIHOP = 72" # Multihop attempted + "L_EDOTDOT = 73" # RFS specific error + "L_EBADMSG = 74" # Not a data message + "L_EOVERFLOW = 75" # Value too large for defined data type + "L_ENOTUNIQ = 76" # Name not unique on network + "L_EBADFD = 77" # File descriptor in bad state + "L_EREMCHG = 78" # Remote address changed + "L_ELIBACC = 79" # Can not access a needed shared library + "L_ELIBBAD = 80" # Accessing a corrupted shared library + "L_ELIBSCN = 81" # .lib section in a.out corrupted + "L_ELIBMAX = 82" # Attempting to link in too many shared libraries + "L_ELIBEXEC = 83" # Cannot exec a shared library directly + "L_EILSEQ = 84" # Illegal byte sequence + "L_ERESTART = 85" # Interrupted system call should be restarted + "L_ESTRPIPE = 86" # Streams pipe error + "L_EUSERS = 87" # Too many users + "L_ENOTSOCK = 88" # Socket operation on non-socket + "L_EDESTADDRREQ = 89" # Destination address required + "L_EMSGSIZE = 90" # Message too long + "L_EPROTOTYPE = 91" # Protocol wrong type for socket + "L_ENOPROTOOPT = 92" # Protocol not available + "L_EPROTONOSUPPORT = 93" # Protocol not supported + "L_ESOCKTNOSUPPORT = 94" # Socket type not supported + "L_EOPNOTSUPP = 95" # Operation not supported on transport endpoint + "L_EPFNOSUPPORT = 96" # Protocol family not supported + "L_EAFNOSUPPORT = 97" # Address family not supported by protocol + "L_EADDRINUSE = 98" # Address already in use + "L_EADDRNOTAVAIL = 99" # Cannot assign requested address + "L_ENETDOWN = 100" # Network is down + "L_ENETUNREACH = 101" # Network is unreachable + "L_ENETRESET = 102" # Network dropped connection because of reset + "L_ECONNABORTED = 103" # Software caused connection abort + "L_ECONNRESET = 104" # Connection reset by peer + "L_ENOBUFS = 105" # No buffer space available + "L_EISCONN = 106" # Transport endpoint is already connected + "L_ENOTCONN = 107" # Transport endpoint is not connected + "L_ESHUTDOWN = 108" # Cannot send after transport endpoint shutdown + "L_ETOOMANYREFS = 109" # Too many references: cannot splice + "L_ETIMEDOUT = 110" # Connection timed out + "L_ECONNREFUSED = 111" # Connection refused + "L_EHOSTDOWN = 112" # Host is down + "L_EHOSTUNREACH = 113" # No route to host + "L_EALREADY = 114" # Operation already in progress + "L_EINPROGRESS = 115" # Operation now in progress + "L_ESTALE = 116" # Stale file handle + "L_EUCLEAN = 117" # Structure needs cleaning + "L_ENOTNAM = 118" # Not a XENIX named type file + "L_ENAVAIL = 119" # No XENIX semaphores available + "L_EISNAM = 120" # Is a named type file + "L_EREMOTEIO = 121" # Remote I/O error + "L_EDQUOT = 122" # Quota exceeded + "L_ENOMEDIUM = 123" # No medium found + "L_EMEDIUMTYPE = 124" # Wrong medium type + "L_ECANCELED = 125" # Operation Canceled + "L_ENOKEY = 126" # Required key not available + "L_EKEYEXPIRED = 127" # Key has expired + "L_EKEYREVOKED = 128" # Key has been revoked + "L_EKEYREJECTED = 129" # Key was rejected by service + "L_EOWNERDEAD = 130" # Owner died + "L_ENOTRECOVERABLE = 131" # State not recoverable + "L_ERFKILL = 132" # Operation not possible due to RF-kill + "L_EHWPOISON = 133" # Memory page has hardware error num super_magic = 4 # See <linux/magic.h> (linux.git include/uapi/linux/magic.h). diff --git a/lib9p/idl/2010-9P2000.L.9p.gen b/lib9p/idl/2010-9P2000.L.9p.gen new file mode 100755 index 0000000..cb32585 --- /dev/null +++ b/lib9p/idl/2010-9P2000.L.9p.gen @@ -0,0 +1,282 @@ +#!/usr/bin/env python +# lib9p/idl/2010-9P2000.L.9p.gen - Generate definitions of 9P2000.L messages +import sys + +print( + f"# lib9p/idl/2010-9P2000.L.9p - Generated by `{' '.join(sys.argv)}`. DO NOT EDIT!" +) +errnos: dict[str, tuple[int, str]] = {} +with open(sys.argv[1], "r", encoding="utf-8") as fh: + for line in fh: + if line.startswith("#"): + print(line) + continue + _num, _name, _desc = line.split(maxsplit=2) + errnos[_name] = (int(_num), _desc.strip()) +print( + """ +# lib9p/idl/2010-9P2000.L.9p - Definitions of 9P2000.L messages +# +# Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> +# SPDX-License-Identifier: AGPL-3.0-or-later + +# "9P2000.L" Linux extension +# https://github.com/chaos/diod/blob/master/protocol.md +# https://github.com/chaos/diod/blob/master/src/libnpfs/protocol.h +version "9P2000.L" + +# low-level types ############################################################## + +from ./2002-9P2000.9p import tag, fid, s, qt, qid +from ./2005-9P2000.u.9p import nuid, errno + +# BUG: The definitions of errno are not defined in the 9P2000.L +# protocol spec, and Linux kernel errno values vary by architecture. +# Most architectures share a "generic" list, but a handful (as of +# Linux v6.14, Alpha, MIPS, PA-RISC, PowerPC, and SPARC) have their +# own numbers. This IDL file lists the generic numbers. +# +# https://github.com/chaos/diod/issues/35 +""".strip() +) + +prefix = "num errno += " +namelen = max(len(name) for name in errnos) +numlen = max(len(str(num)) for (num, desc) in errnos.values()) +for name, (num, desc) in errnos.items(): + print(f'{prefix}"L_{name:<{namelen}} = {num:>{numlen}}" # {desc}') + prefix = " " * len(prefix) +print() + +print( + """ +num super_magic = 4 + # See <linux/magic.h> (linux.git include/uapi/linux/magic.h). + # + # To quote `util-linux.git:include/statfs_magic.h`: + # "Unfortunately, Linux kernel header file <linux/magic.h> is + # incomplete mess and kernel returns by statfs f_type many numbers + # that are nowhere specified (in API)." + # + # util-linux <statfs_magic.h> is also incomplete. As is the + # statfs(2) man-page. + # + # I'm working on a patchset to the kernel to get <linux/magic.h> + # to be complete, but in the mean-time I'm just not going to + # bother with putting a list here. + # + # TODO + "V9FS_MAGIC=0x01021997" + +# "L"inux "O"pen flags (flags to pass to Tlopen and Tlcreate) +# +# The values are not specified in in protocol.md, but are specified in +# protocol.h (and are different than the Linux kernel's values, which +# vary by architecture). +bitfield lo = 4 + "bit 0=num(MODE)" # low bit of the 2-bit RDONLY/WRONLY/RDWR/NOACCESS enum + "bit 1=num(MODE)" # high bit of the 2-bit RDONLY/WRONLY/RDWR/NOACCESS enum + #"bit 2=unused" + #"bit 3=unused" + #"bit 4=unused" + #"bit 5=unused" + "bit 6=CREATE" + "bit 7=EXCL" + "bit 8=NOCTTY" + "bit 9=TRUNC" + "bit 10=APPEND" + "bit 11=NONBLOCK" + "bit 12=DSYNC" + "bit 13=BSD_FASYNC" + "bit 14=DIRECT" + "bit 15=LARGEFILE" + "bit 16=DIRECTORY" + "bit 17=NOFOLLOW" + "bit 18=NOATIME" + "bit 19=CLOEXEC" + "bit 20=SYNC" + + "num(MODE) RDONLY = 0" + "num(MODE) WRONLY = 1" + "num(MODE) RDWR = 2" + "num(MODE) NOACCESS = 3" + + "mask FLAG = 0b111111111111111000000" + +# "D"irentry "T"ype +# +# These match the Linux kernel's values. +num dt = 1 + "UNKNOWN = 0" + "PIPE = 1" + "CHAR_DEV = 2" + "DIRECTORY = 4" + "BLOCK_DEV = 6" # proof it's not a bitfield + "REGULAR = 8" + "SYMLINK = 10" # proof it's not a bitfield + "SOCKET = 12" # proof it's not a bitfield + "_WHITEOUT = 14" # proof it's not a bitfield + +# Mode +# +# These match the Linux kernel's values. Why is this 32-bits wide +# instead of just 16? Who knows? +bitfield mode = 4 + #... + "bit 15=num(FMT)" # bit of the 4-bit FMT_ enum + "bit 14=num(FMT)" # bit of the 4-bit FMT_ enum + "bit 13=num(FMT)" # bit of the 4-bit FMT_ enum + "bit 12=num(FMT)" # bit of the 4-bit FMT_ enum + #... + "bit 11=PERM_SETGROUP" + "bit 10=PERM_SETUSER" + "bit 9=PERM_STICKY" + "bit 8=PERM_OWNER_R" + "bit 7=PERM_OWNER_W" + "bit 6=PERM_OWNER_X" + "bit 5=PERM_GROUP_R" + "bit 4=PERM_GROUP_W" + "bit 3=PERM_GROUP_X" + "bit 2=PERM_OTHER_R" + "bit 1=PERM_OTHER_W" + "bit 0=PERM_OTHER_X" + + "num(FMT) PIPE = dt.PIPE<<12" + "num(FMT) CHAR_DEV = dt.CHAR_DEV<<12" + "num(FMT) DIRECTORY = dt.DIRECTORY<<12" + "num(FMT) BLOCK_DEV = dt.BLOCK_DEV<<12" + "num(FMT) REGULAR = dt.REGULAR<<12" + "num(FMT) SYMLINK = dt.SYMLINK<<12" + "num(FMT) SOCKET = dt.SOCKET<<12" + + "mask PERM = 07777" # PERM_* + +# A boolean value that is for some reason 4 bytes wide. +num b4 = 4 + "FALSE=0" + "TRUE=1" + # all other values are true also + +bitfield getattr = 8 + "bit 0=MODE" + "bit 1=NLINK" + "bit 2=UID" + "bit 3=GID" + "bit 4=RDEV" + "bit 5=ATIME" + "bit 6=MTIME" + "bit 7=CTIME" + "bit 8=INO" + "bit 9=SIZE" + "bit 10=BLOCKS" + + "bit 11=BTIME" + "bit 12=GEN" + "bit 13=DATA_VERSION" + + "alias BASIC=0x000007ff" # Mask for fields up to BLOCKS + "alias ALL =0x00003fff" # Mask for All fields above + +bitfield setattr = 4 + "bit 0=MODE" + "bit 1=UID" + "bit 2=GID" + "bit 3=SIZE" + "bit 4=ATIME" + "bit 5=MTIME" + "bit 6=CTIME" + "bit 7=ATIME_SET" + "bit 8=MTIME_SET" + +num lock_type = 1 + "RDLCK=0" + "WRLCK=1" + "UNLCK=2" + +bitfield lock_flags = 4 + "bit 0=BLOCK" + "bit 1=RECLAIM" + +num lock_status = 1 + "SUCCESS=0" + "BLOCKED=1" + "ERROR=2" + "GRACE=3" + +# 9P2000 Operations (.L subset) ################################################ + +from ./2002-9P2000.9p import Tversion, Rversion +from ./2002-9P2000.9p import Tflush, Rflush +from ./2002-9P2000.9p import Twalk, Rwalk +from ./2002-9P2000.9p import Tread, Rread, Twrite, Rwrite +from ./2002-9P2000.9p import Tclunk, Rclunk +from ./2002-9P2000.9p import Tremove, Rremove + +# 9P2000.u Operations (.L subset) ############################################## + +from ./2005-9P2000.u.9p import Tattach, Rattach, Tauth, Rauth + +# 9P2000.L Operations ########################################################## + +#msg Tlerror = "size[4,val=end-&size] typ[1,val=6] tag[tag] illegal" # analogous to 106/Terror +msg Rlerror = "size[4,val=end-&size] typ[1,val=7] tag[tag] errnum[errno]" # analogous to 107/Rerror +msg Tstatfs = "size[4,val=end-&size] typ[1,val=8] tag[tag] fid[fid]" +msg Rstatfs = "size[4,val=end-&size] typ[1,val=9] tag[tag]" # Description | statfs | statvfs + "type[super_magic]" # Type of filesystem | f_type | - + "bsize[4]" # Block size in bytes | f_bsize | f_bsize + # - # Fragment size in bytes | f_frsize (since Linux 2.6) | f_frsize + "blocks[8]" # Size of FS in f_frsize units | f_blocks | f_blocks + "bfree[8]" # Number of free blocks | f_bfree | f_bfree + "bavail[8]" # Number of free blocks for unprivileged users | f_bavail | b_avail + "files[8]" # Number of inodes | f_files | f_files + "ffree[8]" # Number of free inodes | f_ffree | f_ffree + # - # Number of free inodes for unprivileged users | - | f_favail + "fsid[8]" # Filesystem instance ID | f_fsid | f_fsid + # - # Mount flags | f_flags (since Linux 2.6.36) | f_flag + "namelen[4]" # Maximum filename length | f_namemax | f_namemax +msg Tlopen = "size[4,val=end-&size] typ[1,val=12] tag[tag] fid[fid] flags[lo]" # analogous to 112/Topen +msg Rlopen = "size[4,val=end-&size] typ[1,val=13] tag[tag] qid[qid] iounit[4]" # analogous to 113/Ropen +msg Tlcreate = "size[4,val=end-&size] typ[1,val=14] tag[tag] fid[fid] name[s] flags[lo] mode[mode] gid[nuid]" # analogous to 114/Tcreate +msg Rlcreate = "size[4,val=end-&size] typ[1,val=15] tag[tag] qid[qid] iounit[4]" # analogous to 115/Rcreate +msg Tsymlink = "size[4,val=end-&size] typ[1,val=16] tag[tag] fid[fid] name[s] symtgt[s] gid[nuid]" +msg Rsymlink = "size[4,val=end-&size] typ[1,val=17] tag[tag] qid[qid]" +msg Tmknod = "size[4,val=end-&size] typ[1,val=18] tag[tag] dfid[fid] name[s] mode[mode] major[4] minor[4] gid[nuid]" +msg Rmknod = "size[4,val=end-&size] typ[1,val=19] tag[tag] qid[qid]" +msg Trename = "size[4,val=end-&size] typ[1,val=20] tag[tag] fid[fid] dfid[fid] name[s]" +msg Rrename = "size[4,val=end-&size] typ[1,val=21] tag[tag]" +msg Treadlink = "size[4,val=end-&size] typ[1,val=22] tag[tag] fid[fid]" +msg Rreadlink = "size[4,val=end-&size] typ[1,val=23] tag[tag] target[s]" +msg Tgetattr = "size[4,val=end-&size] typ[1,val=24] tag[tag] fid[fid] request_mask[getattr]" +msg Rgetattr = "size[4,val=end-&size] typ[1,val=25] tag[tag] valid[getattr] qid[qid] mode[mode] uid[nuid] gid[nuid] nlink[8]" + "rdev[8] filesize[8] blksize[8] blocks[8]" + "atime_sec[8] atime_nsec[8] mtime_sec[8] mtime_nsec[8]" + "ctime_sec[8] ctime_nsec[8] btime_sec[8] btime_nsec[8]" + "gen[8] data_version[8]" +msg Tsetattr = "size[4,val=end-&size] typ[1,val=26] tag[tag] fid[fid] valid[setattr] mode[mode] uid[nuid] gid[nuid] filesize[8] atime_sec[8] atime_nsec[8] mtime_sec[8] mtime_nsec[8]" +msg Rsetattr = "size[4,val=end-&size] typ[1,val=27] tag[tag]" +#... +msg Txattrwalk = "size[4,val=end-&size] typ[1,val=30] tag[tag] fid[fid] newfid[fid] name[s]" +msg Rxattrwalk = "size[4,val=end-&size] typ[1,val=31] tag[tag] attr_size[8]" +msg Txattrcreate = "size[4,val=end-&size] typ[1,val=32] tag[tag] fid[fid] name[s] attr_size[8] flags[4]" +msg Rxattrcreate = "size[4,val=end-&size] typ[1,val=33] tag[tag]" +#... +msg Treaddir = "size[4,val=end-&size] typ[1,val=40] tag[tag] fid[fid] offset[8] count[4]" +msg Rreaddir = "size[4,val=end-&size] typ[1,val=41] tag[tag] count[4] count*(data[1])" # data is "qid[qid] offset[8] type[dt] name[s]" +#... +msg Tfsync = "size[4,val=end-&size] typ[1,val=50] tag[tag] fid[fid] datasync[b4]" +msg Rfsync = "size[4,val=end-&size] typ[1,val=51] tag[tag]" +msg Tlock = "size[4,val=end-&size] typ[1,val=52] tag[tag] fid[fid] type[lock_type] flags[lock_flags] start[8] length[8] proc_id[4] client_id[s]" +msg Rlock = "size[4,val=end-&size] typ[1,val=53] tag[tag] status[lock_status]" +msg Tgetlock = "size[4,val=end-&size] typ[1,val=54] tag[tag] fid[fid] type[lock_type] start[8] length[8] proc_id[4] client_id[s]" +msg Rgetlock = "size[4,val=end-&size] typ[1,val=55] tag[tag] type[lock_type] start[8] length[8] proc_id[4] client_id[s]" +# ... +msg Tlink = "size[4,val=end-&size] typ[1,val=70] tag[tag] dfid[fid] fid[fid] name[s]" +msg Rlink = "size[4,val=end-&size] typ[1,val=71] tag[tag]" +msg Tmkdir = "size[4,val=end-&size] typ[1,val=72] tag[tag] dfid[fid] name[s] mode[mode] gid[nuid]" +msg Rmkdir = "size[4,val=end-&size] typ[1,val=73] tag[tag] qid[qid]" +msg Trenameat = "size[4,val=end-&size] typ[1,val=74] tag[tag] olddirfid[fid] oldname[s] newdirfid[fid] newname[s]" +msg Rrenameat = "size[4,val=end-&size] typ[1,val=75] tag[tag]" +msg Tunlinkat = "size[4,val=end-&size] typ[1,val=76] tag[tag] dirfd[fid] name[s] flags[4]" +msg Runlinkat = "size[4,val=end-&size] typ[1,val=77] tag[tag]" +""".strip() +) diff --git a/lib9p/idl/__init__.py b/lib9p/idl/__init__.py index 154e157..3133cc4 100644 --- a/lib9p/idl/__init__.py +++ b/lib9p/idl/__init__.py @@ -647,6 +647,7 @@ def re_string(grpname: str) -> str: re_line_version = f"version\\s+{re_string('version')}" re_line_import = f"from\\s+(?P<file>\\S+)\\s+import\\s+(?P<syms>{re_impname}(?:\\s*,\\s*{re_impname})*)" re_line_num = f"num\\s+(?P<name>{re_symname})\\s*=\\s*(?P<prim>{re_priname})" +re_line_num_ = f"num\\s+(?P<name>{re_symname})\\s*\\+=\\s*{re_string('spec')}" re_line_bitfield = f"bitfield\\s+(?P<name>{re_symname})\\s*=\\s*(?P<prim>{re_priname})" re_line_bitfield_ = f"bitfield\\s+(?P<name>{re_symname})\\s*\\+=\\s*{re_string('spec')}" re_line_struct = ( @@ -739,6 +740,11 @@ def parse_file( raise ValueError(f"duplicate type name {num.typname!r}") env[num.typname] = num prev = num + elif m := re.fullmatch(re_line_num_, line): + num = get_type(env, m.group("name"), Number) + parse_numspec(env, version, num, m.group("spec")) + + prev = num elif m := re.fullmatch(re_line_bitfield, line): prim = env[m.group("prim")] assert isinstance(prim, Primitive) diff --git a/lib9p/tests/test_compile.c b/lib9p/tests/test_compile.c index 2895c7c..4532655 100644 --- a/lib9p/tests/test_compile.c +++ b/lib9p/tests/test_compile.c @@ -61,6 +61,137 @@ int main(void) { x = LIB9P_O_MODE_MASK; x = LIB9P_NUID_NONUID; x = LIB9P_ERRNO_NOERROR; + x = LIB9P_ERRNO_L_EPERM; + x = LIB9P_ERRNO_L_ENOENT; + x = LIB9P_ERRNO_L_ESRCH; + x = LIB9P_ERRNO_L_EINTR; + x = LIB9P_ERRNO_L_EIO; + x = LIB9P_ERRNO_L_ENXIO; + x = LIB9P_ERRNO_L_E2BIG; + x = LIB9P_ERRNO_L_ENOEXEC; + x = LIB9P_ERRNO_L_EBADF; + x = LIB9P_ERRNO_L_ECHILD; + x = LIB9P_ERRNO_L_EAGAIN; + x = LIB9P_ERRNO_L_ENOMEM; + x = LIB9P_ERRNO_L_EACCES; + x = LIB9P_ERRNO_L_EFAULT; + x = LIB9P_ERRNO_L_ENOTBLK; + x = LIB9P_ERRNO_L_EBUSY; + x = LIB9P_ERRNO_L_EEXIST; + x = LIB9P_ERRNO_L_EXDEV; + x = LIB9P_ERRNO_L_ENODEV; + x = LIB9P_ERRNO_L_ENOTDIR; + x = LIB9P_ERRNO_L_EISDIR; + x = LIB9P_ERRNO_L_EINVAL; + x = LIB9P_ERRNO_L_ENFILE; + x = LIB9P_ERRNO_L_EMFILE; + x = LIB9P_ERRNO_L_ENOTTY; + x = LIB9P_ERRNO_L_ETXTBSY; + x = LIB9P_ERRNO_L_EFBIG; + x = LIB9P_ERRNO_L_ENOSPC; + x = LIB9P_ERRNO_L_ESPIPE; + x = LIB9P_ERRNO_L_EROFS; + x = LIB9P_ERRNO_L_EMLINK; + x = LIB9P_ERRNO_L_EPIPE; + x = LIB9P_ERRNO_L_EDOM; + x = LIB9P_ERRNO_L_ERANGE; + x = LIB9P_ERRNO_L_EDEADLK; + x = LIB9P_ERRNO_L_ENAMETOOLONG; + x = LIB9P_ERRNO_L_ENOLCK; + x = LIB9P_ERRNO_L_ENOSYS; + x = LIB9P_ERRNO_L_ENOTEMPTY; + x = LIB9P_ERRNO_L_ELOOP; + x = LIB9P_ERRNO_L_ENOMSG; + x = LIB9P_ERRNO_L_EIDRM; + x = LIB9P_ERRNO_L_ECHRNG; + x = LIB9P_ERRNO_L_EL2NSYNC; + x = LIB9P_ERRNO_L_EL3HLT; + x = LIB9P_ERRNO_L_EL3RST; + x = LIB9P_ERRNO_L_ELNRNG; + x = LIB9P_ERRNO_L_EUNATCH; + x = LIB9P_ERRNO_L_ENOCSI; + x = LIB9P_ERRNO_L_EL2HLT; + x = LIB9P_ERRNO_L_EBADE; + x = LIB9P_ERRNO_L_EBADR; + x = LIB9P_ERRNO_L_EXFULL; + x = LIB9P_ERRNO_L_ENOANO; + x = LIB9P_ERRNO_L_EBADRQC; + x = LIB9P_ERRNO_L_EBADSLT; + x = LIB9P_ERRNO_L_EBFONT; + x = LIB9P_ERRNO_L_ENOSTR; + x = LIB9P_ERRNO_L_ENODATA; + x = LIB9P_ERRNO_L_ETIME; + x = LIB9P_ERRNO_L_ENOSR; + x = LIB9P_ERRNO_L_ENONET; + x = LIB9P_ERRNO_L_ENOPKG; + x = LIB9P_ERRNO_L_EREMOTE; + x = LIB9P_ERRNO_L_ENOLINK; + x = LIB9P_ERRNO_L_EADV; + x = LIB9P_ERRNO_L_ESRMNT; + x = LIB9P_ERRNO_L_ECOMM; + x = LIB9P_ERRNO_L_EPROTO; + x = LIB9P_ERRNO_L_EMULTIHOP; + x = LIB9P_ERRNO_L_EDOTDOT; + x = LIB9P_ERRNO_L_EBADMSG; + x = LIB9P_ERRNO_L_EOVERFLOW; + x = LIB9P_ERRNO_L_ENOTUNIQ; + x = LIB9P_ERRNO_L_EBADFD; + x = LIB9P_ERRNO_L_EREMCHG; + x = LIB9P_ERRNO_L_ELIBACC; + x = LIB9P_ERRNO_L_ELIBBAD; + x = LIB9P_ERRNO_L_ELIBSCN; + x = LIB9P_ERRNO_L_ELIBMAX; + x = LIB9P_ERRNO_L_ELIBEXEC; + x = LIB9P_ERRNO_L_EILSEQ; + x = LIB9P_ERRNO_L_ERESTART; + x = LIB9P_ERRNO_L_ESTRPIPE; + x = LIB9P_ERRNO_L_EUSERS; + x = LIB9P_ERRNO_L_ENOTSOCK; + x = LIB9P_ERRNO_L_EDESTADDRREQ; + x = LIB9P_ERRNO_L_EMSGSIZE; + x = LIB9P_ERRNO_L_EPROTOTYPE; + x = LIB9P_ERRNO_L_ENOPROTOOPT; + x = LIB9P_ERRNO_L_EPROTONOSUPPORT; + x = LIB9P_ERRNO_L_ESOCKTNOSUPPORT; + x = LIB9P_ERRNO_L_EOPNOTSUPP; + x = LIB9P_ERRNO_L_EPFNOSUPPORT; + x = LIB9P_ERRNO_L_EAFNOSUPPORT; + x = LIB9P_ERRNO_L_EADDRINUSE; + x = LIB9P_ERRNO_L_EADDRNOTAVAIL; + x = LIB9P_ERRNO_L_ENETDOWN; + x = LIB9P_ERRNO_L_ENETUNREACH; + x = LIB9P_ERRNO_L_ENETRESET; + x = LIB9P_ERRNO_L_ECONNABORTED; + x = LIB9P_ERRNO_L_ECONNRESET; + x = LIB9P_ERRNO_L_ENOBUFS; + x = LIB9P_ERRNO_L_EISCONN; + x = LIB9P_ERRNO_L_ENOTCONN; + x = LIB9P_ERRNO_L_ESHUTDOWN; + x = LIB9P_ERRNO_L_ETOOMANYREFS; + x = LIB9P_ERRNO_L_ETIMEDOUT; + x = LIB9P_ERRNO_L_ECONNREFUSED; + x = LIB9P_ERRNO_L_EHOSTDOWN; + x = LIB9P_ERRNO_L_EHOSTUNREACH; + x = LIB9P_ERRNO_L_EALREADY; + x = LIB9P_ERRNO_L_EINPROGRESS; + x = LIB9P_ERRNO_L_ESTALE; + x = LIB9P_ERRNO_L_EUCLEAN; + x = LIB9P_ERRNO_L_ENOTNAM; + x = LIB9P_ERRNO_L_ENAVAIL; + x = LIB9P_ERRNO_L_EISNAM; + x = LIB9P_ERRNO_L_EREMOTEIO; + x = LIB9P_ERRNO_L_EDQUOT; + x = LIB9P_ERRNO_L_ENOMEDIUM; + x = LIB9P_ERRNO_L_EMEDIUMTYPE; + x = LIB9P_ERRNO_L_ECANCELED; + x = LIB9P_ERRNO_L_ENOKEY; + x = LIB9P_ERRNO_L_EKEYEXPIRED; + x = LIB9P_ERRNO_L_EKEYREVOKED; + x = LIB9P_ERRNO_L_EKEYREJECTED; + x = LIB9P_ERRNO_L_EOWNERDEAD; + x = LIB9P_ERRNO_L_ENOTRECOVERABLE; + x = LIB9P_ERRNO_L_ERFKILL; + x = LIB9P_ERRNO_L_EHWPOISON; x = LIB9P_SUPER_MAGIC_V9FS_MAGIC; x = _LIB9P_LO_UNUSED_31; x = _LIB9P_LO_UNUSED_30; diff --git a/lib9p/tests/testclient-p9p.explog b/lib9p/tests/testclient-p9p.explog index 4ba19b3..e5901d2 100644 --- a/lib9p/tests/testclient-p9p.explog +++ b/lib9p/tests/testclient-p9p.explog @@ -5,7 +5,7 @@ > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } > Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } -< Rerror { tag=0 errstr="authentication not required" errnum=95 } +< Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=0 wname=[ ] } @@ -27,7 +27,7 @@ > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } > Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } -< Rerror { tag=0 errstr="authentication not required" errnum=95 } +< Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "Documentation" ] } @@ -49,7 +49,7 @@ > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } > Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } -< Rerror { tag=0 errstr="authentication not required" errnum=95 } +< Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "README.md" ] } @@ -65,7 +65,7 @@ > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } > Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } -< Rerror { tag=0 errstr="authentication not required" errnum=95 } +< Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=2 wname=[ "Documentation", "x" ] } @@ -81,7 +81,7 @@ > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } > Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } -< Rerror { tag=0 errstr="authentication not required" errnum=95 } +< Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=2 wname=[ "Documentation", "x" ] } @@ -93,7 +93,7 @@ > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } > Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } -< Rerror { tag=0 errstr="authentication not required" errnum=95 } +< Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "shutdown" ] } diff --git a/lib9p/tests/testclient-sess.explog b/lib9p/tests/testclient-sess.explog index aa5ecb8..268da72 100644 --- a/lib9p/tests/testclient-sess.explog +++ b/lib9p/tests/testclient-sess.explog @@ -55,7 +55,7 @@ > Tread { tag=1 fid=2 offset=0 count=6 } > Tflush { tag=2 oldtag=1 } < Rflush { tag=2 } -< Rerror { tag=1 errstr="request canceled by flush" errnum=125 } +< Rerror { tag=1 errstr="request canceled by flush" errnum=L_ECANCELED } # flush, unknown tag > Tflush { tag=0 oldtag=99 } |