- case -1: // EPERM Operation not permitted\r
- return EFI_SECURITY_VIOLATION;\r
-\r
- case -2: // ENOENT No such file or directory\r
- case -3: // ESRCH No such process\r
- case -6: // ENXIO No such device or address\r
- case -10: // ECHILD No child processes\r
- case -19: // ENODEV No such device\r
- case -49: // EUNATCH Protocol driver not attached\r
- case -65: // ENOPKG Package not installed\r
- case -79: // ELIBACC Can not access a needed shared library\r
- case -126: // ENOKEY Required key not available\r
- return EFI_NOT_FOUND;\r
-\r
- case -4: // EINTR Interrupted system call\r
- case -11: // EAGAIN, EWOULDBLOCK Resource temporarily unavailable\r
- case -16: // EBUSY Device or resource busy\r
- case -26: // ETXTBSY Text file busy\r
- case -35: // EDEADLK, EDEADLOCK Resource deadlock avoided\r
- case -39: // ENOTEMPTY Directory not empty\r
- case -42: // ENOMSG No message of desired type\r
- case -61: // ENODATA No data available\r
- case -85: // ERESTART Interrupted system call should be restarted\r
- return EFI_NOT_READY;\r
-\r
- case -5: // EIO Input/output error\r
- case -45: // EL2NSYNC Level 2 not synchronized\r
- case -46: // EL3HLT Level 3 halted\r
- case -47: // EL3RST Level 3 reset\r
- case -51: // EL2HLT Level 2 halted\r
- case -121: // EREMOTEIO Remote I/O error\r
- case -133: // EHWPOISON Memory page has hardware error\r
- return EFI_DEVICE_ERROR;\r
-\r
- case -7: // E2BIG Argument list too long\r
- case -36: // ENAMETOOLONG File name too long\r
- case -90: // EMSGSIZE Message too long\r
- return EFI_BAD_BUFFER_SIZE;\r
-\r
- case -8: // ENOEXEC Exec format error\r
- case -15: // ENOTBLK Block device required\r
- case -18: // EXDEV Invalid cross-device link\r
- case -20: // ENOTDIR Not a directory\r
- case -21: // EISDIR Is a directory\r
- case -25: // ENOTTY Inappropriate ioctl for device\r
- case -27: // EFBIG File too large\r
- case -29: // ESPIPE Illegal seek\r
- case -38: // ENOSYS Function not implemented\r
- case -59: // EBFONT Bad font file format\r
- case -60: // ENOSTR Device not a stream\r
- case -83: // ELIBEXEC Cannot exec a shared library directly\r
- case -88: // ENOTSOCK Socket operation on non-socket\r
- case -91: // EPROTOTYPE Protocol wrong type for socket\r
- case -92: // ENOPROTOOPT Protocol not available\r
- case -93: // EPROTONOSUPPORT Protocol not supported\r
- case -94: // ESOCKTNOSUPPORT Socket type not supported\r
- case -95: // ENOTSUP, EOPNOTSUPP Operation not supported\r
- case -96: // EPFNOSUPPORT Protocol family not supported\r
- case -97: // EAFNOSUPPORT Address family not supported by protocol\r
- case -99: // EADDRNOTAVAIL Cannot assign requested address\r
- case -118: // ENOTNAM Not a XENIX named type file\r
- case -120: // EISNAM Is a named type file\r
- case -124: // EMEDIUMTYPE Wrong medium type\r
- return EFI_UNSUPPORTED;\r
-\r
- case -9: // EBADF Bad file descriptor\r
- case -14: // EFAULT Bad address\r
- case -44: // ECHRNG Channel number out of range\r
- case -48: // ELNRNG Link number out of range\r
- case -53: // EBADR Invalid request descriptor\r
- case -56: // EBADRQC Invalid request code\r
- case -57: // EBADSLT Invalid slot\r
- case -76: // ENOTUNIQ Name not unique on network\r
- case -84: // EILSEQ Invalid or incomplete multibyte or wide character\r
- return EFI_NO_MAPPING;\r
-\r
- case -12: // ENOMEM Cannot allocate memory\r
- case -23: // ENFILE Too many open files in system\r
- case -24: // EMFILE Too many open files\r
- case -31: // EMLINK Too many links\r
- case -37: // ENOLCK No locks available\r
- case -40: // ELOOP Too many levels of symbolic links\r
- case -50: // ENOCSI No CSI structure available\r
- case -55: // ENOANO No anode\r
- case -63: // ENOSR Out of streams resources\r
- case -82: // ELIBMAX Attempting to link in too many shared libraries\r
- case -87: // EUSERS Too many users\r
- case -105: // ENOBUFS No buffer space available\r
- case -109: // ETOOMANYREFS Too many references: cannot splice\r
- case -119: // ENAVAIL No XENIX semaphores available\r
- case -122: // EDQUOT Disk quota exceeded\r
- return EFI_OUT_OF_RESOURCES;\r
+ case -1:// EPERM Operation not permitted\r
+ return EFI_SECURITY_VIOLATION;\r
+\r
+ case -2: // ENOENT No such file or directory\r
+ case -3: // ESRCH No such process\r
+ case -6: // ENXIO No such device or address\r
+ case -10: // ECHILD No child processes\r
+ case -19: // ENODEV No such device\r
+ case -49: // EUNATCH Protocol driver not attached\r
+ case -65: // ENOPKG Package not installed\r
+ case -79: // ELIBACC Can not access a needed shared library\r
+ case -126: // ENOKEY Required key not available\r
+ return EFI_NOT_FOUND;\r
+\r
+ case -4: // EINTR Interrupted system call\r
+ case -11: // EAGAIN, EWOULDBLOCK Resource temporarily unavailable\r
+ case -16: // EBUSY Device or resource busy\r
+ case -26: // ETXTBSY Text file busy\r
+ case -35: // EDEADLK, EDEADLOCK Resource deadlock avoided\r
+ case -39: // ENOTEMPTY Directory not empty\r
+ case -42: // ENOMSG No message of desired type\r
+ case -61: // ENODATA No data available\r
+ case -85: // ERESTART Interrupted system call should be restarted\r
+ return EFI_NOT_READY;\r
+\r
+ case -5: // EIO Input/output error\r
+ case -45: // EL2NSYNC Level 2 not synchronized\r
+ case -46: // EL3HLT Level 3 halted\r
+ case -47: // EL3RST Level 3 reset\r
+ case -51: // EL2HLT Level 2 halted\r
+ case -121: // EREMOTEIO Remote I/O error\r
+ case -133: // EHWPOISON Memory page has hardware error\r
+ return EFI_DEVICE_ERROR;\r
+\r
+ case -7: // E2BIG Argument list too long\r
+ case -36: // ENAMETOOLONG File name too long\r
+ case -90: // EMSGSIZE Message too long\r
+ return EFI_BAD_BUFFER_SIZE;\r
+\r
+ case -8: // ENOEXEC Exec format error\r
+ case -15: // ENOTBLK Block device required\r
+ case -18: // EXDEV Invalid cross-device link\r
+ case -20: // ENOTDIR Not a directory\r
+ case -21: // EISDIR Is a directory\r
+ case -25: // ENOTTY Inappropriate ioctl for device\r
+ case -27: // EFBIG File too large\r
+ case -29: // ESPIPE Illegal seek\r
+ case -38: // ENOSYS Function not implemented\r
+ case -59: // EBFONT Bad font file format\r
+ case -60: // ENOSTR Device not a stream\r
+ case -83: // ELIBEXEC Cannot exec a shared library directly\r
+ case -88: // ENOTSOCK Socket operation on non-socket\r
+ case -91: // EPROTOTYPE Protocol wrong type for socket\r
+ case -92: // ENOPROTOOPT Protocol not available\r
+ case -93: // EPROTONOSUPPORT Protocol not supported\r
+ case -94: // ESOCKTNOSUPPORT Socket type not supported\r
+ case -95: // ENOTSUP, EOPNOTSUPP Operation not supported\r
+ case -96: // EPFNOSUPPORT Protocol family not supported\r
+ case -97: // EAFNOSUPPORT Address family not supported by protocol\r
+ case -99: // EADDRNOTAVAIL Cannot assign requested address\r
+ case -118: // ENOTNAM Not a XENIX named type file\r
+ case -120: // EISNAM Is a named type file\r
+ case -124: // EMEDIUMTYPE Wrong medium type\r
+ return EFI_UNSUPPORTED;\r