@ -3,7 +3,9 @@
#![ allow(non_snake_case) ]
#![ allow(dead_code) ]
use crate ::old ::snapshot_0 ::host ::FileType ;
use crate ::old ::snapshot_0 ::{ helpers , sys ::unix ::sys_impl , wasi , Error , Result } ;
use crate ::old ::snapshot_0 ::{
error ::FromRawOsError , helpers , sys ::unix ::sys_impl , wasi , Error , Result ,
} ;
use std ::ffi ::OsStr ;
use std ::os ::unix ::prelude ::OsStrExt ;
use yanix ::{
@ -13,82 +15,90 @@ use yanix::{
pub ( crate ) use sys_impl ::host_impl ::* ;
pub ( crate ) fn errno_from_nix ( errno : Errno ) -> Error {
match errno {
Errno ::EPERM = > Error ::EPERM ,
Errno ::ENOENT = > Error ::ENOENT ,
Errno ::ESRCH = > Error ::ESRCH ,
Errno ::EINTR = > Error ::EINTR ,
Errno ::EIO = > Error ::EIO ,
Errno ::ENXIO = > Error ::ENXIO ,
Errno ::E2BIG = > Error ::E2BIG ,
Errno ::ENOEXEC = > Error ::ENOEXEC ,
Errno ::EBADF = > Error ::EBADF ,
Errno ::ECHILD = > Error ::ECHILD ,
Errno ::EAGAIN = > Error ::EAGAIN ,
Errno ::ENOMEM = > Error ::ENOMEM ,
Errno ::EACCES = > Error ::EACCES ,
Errno ::EFAULT = > Error ::EFAULT ,
Errno ::EBUSY = > Error ::EBUSY ,
Errno ::EEXIST = > Error ::EEXIST ,
Errno ::EXDEV = > Error ::EXDEV ,
Errno ::ENODEV = > Error ::ENODEV ,
Errno ::ENOTDIR = > Error ::ENOTDIR ,
Errno ::EISDIR = > Error ::EISDIR ,
Errno ::EINVAL = > Error ::EINVAL ,
Errno ::ENFILE = > Error ::ENFILE ,
Errno ::EMFILE = > Error ::EMFILE ,
Errno ::ENOTTY = > Error ::ENOTTY ,
Errno ::ETXTBSY = > Error ::ETXTBSY ,
Errno ::EFBIG = > Error ::EFBIG ,
Errno ::ENOSPC = > Error ::ENOSPC ,
Errno ::ESPIPE = > Error ::ESPIPE ,
Errno ::EROFS = > Error ::EROFS ,
Errno ::EMLINK = > Error ::EMLINK ,
Errno ::EPIPE = > Error ::EPIPE ,
Errno ::EDOM = > Error ::EDOM ,
Errno ::ERANGE = > Error ::ERANGE ,
Errno ::EDEADLK = > Error ::EDEADLK ,
Errno ::ENAMETOOLONG = > Error ::ENAMETOOLONG ,
Errno ::ENOLCK = > Error ::ENOLCK ,
Errno ::ENOSYS = > Error ::ENOSYS ,
Errno ::ENOTEMPTY = > Error ::ENOTEMPTY ,
Errno ::ELOOP = > Error ::ELOOP ,
Errno ::ENOMSG = > Error ::ENOMSG ,
Errno ::EIDRM = > Error ::EIDRM ,
Errno ::ENOLINK = > Error ::ENOLINK ,
Errno ::EPROTO = > Error ::EPROTO ,
Errno ::EMULTIHOP = > Error ::EMULTIHOP ,
Errno ::EBADMSG = > Error ::EBADMSG ,
Errno ::EOVERFLOW = > Error ::EOVERFLOW ,
Errno ::EILSEQ = > Error ::EILSEQ ,
Errno ::ENOTSOCK = > Error ::ENOTSOCK ,
Errno ::EDESTADDRREQ = > Error ::EDESTADDRREQ ,
Errno ::EMSGSIZE = > Error ::EMSGSIZE ,
Errno ::EPROTOTYPE = > Error ::EPROTOTYPE ,
Errno ::ENOPROTOOPT = > Error ::ENOPROTOOPT ,
Errno ::EPROTONOSUPPORT = > Error ::EPROTONOSUPPORT ,
Errno ::EAFNOSUPPORT = > Error ::EAFNOSUPPORT ,
Errno ::EADDRINUSE = > Error ::EADDRINUSE ,
Errno ::EADDRNOTAVAIL = > Error ::EADDRNOTAVAIL ,
Errno ::ENETDOWN = > Error ::ENETDOWN ,
Errno ::ENETUNREACH = > Error ::ENETUNREACH ,
Errno ::ENETRESET = > Error ::ENETRESET ,
Errno ::ECONNABORTED = > Error ::ECONNABORTED ,
Errno ::ECONNRESET = > Error ::ECONNRESET ,
Errno ::ENOBUFS = > Error ::ENOBUFS ,
Errno ::EISCONN = > Error ::EISCONN ,
Errno ::ENOTCONN = > Error ::ENOTCONN ,
Errno ::ETIMEDOUT = > Error ::ETIMEDOUT ,
Errno ::ECONNREFUSED = > Error ::ECONNREFUSED ,
Errno ::EHOSTUNREACH = > Error ::EHOSTUNREACH ,
Errno ::EALREADY = > Error ::EALREADY ,
Errno ::EINPROGRESS = > Error ::EINPROGRESS ,
Errno ::ESTALE = > Error ::ESTALE ,
Errno ::EDQUOT = > Error ::EDQUOT ,
Errno ::ECANCELED = > Error ::ECANCELED ,
Errno ::EOWNERDEAD = > Error ::EOWNERDEAD ,
Errno ::ENOTRECOVERABLE = > Error ::ENOTRECOVERABLE ,
impl FromRawOsError for Error {
fn from_raw_os_error ( code : i32 ) -> Self {
Self ::from ( Errno ::from_i32 ( code ) )
}
}
impl From < Errno > for Error {
fn from ( errno : Errno ) -> Self {
match errno {
Errno ::EPERM = > Self ::EPERM ,
Errno ::ENOENT = > Self ::ENOENT ,
Errno ::ESRCH = > Self ::ESRCH ,
Errno ::EINTR = > Self ::EINTR ,
Errno ::EIO = > Self ::EIO ,
Errno ::ENXIO = > Self ::ENXIO ,
Errno ::E2BIG = > Self ::E2BIG ,
Errno ::ENOEXEC = > Self ::ENOEXEC ,
Errno ::EBADF = > Self ::EBADF ,
Errno ::ECHILD = > Self ::ECHILD ,
Errno ::EAGAIN = > Self ::EAGAIN ,
Errno ::ENOMEM = > Self ::ENOMEM ,
Errno ::EACCES = > Self ::EACCES ,
Errno ::EFAULT = > Self ::EFAULT ,
Errno ::EBUSY = > Self ::EBUSY ,
Errno ::EEXIST = > Self ::EEXIST ,
Errno ::EXDEV = > Self ::EXDEV ,
Errno ::ENODEV = > Self ::ENODEV ,
Errno ::ENOTDIR = > Self ::ENOTDIR ,
Errno ::EISDIR = > Self ::EISDIR ,
Errno ::EINVAL = > Self ::EINVAL ,
Errno ::ENFILE = > Self ::ENFILE ,
Errno ::EMFILE = > Self ::EMFILE ,
Errno ::ENOTTY = > Self ::ENOTTY ,
Errno ::ETXTBSY = > Self ::ETXTBSY ,
Errno ::EFBIG = > Self ::EFBIG ,
Errno ::ENOSPC = > Self ::ENOSPC ,
Errno ::ESPIPE = > Self ::ESPIPE ,
Errno ::EROFS = > Self ::EROFS ,
Errno ::EMLINK = > Self ::EMLINK ,
Errno ::EPIPE = > Self ::EPIPE ,
Errno ::EDOM = > Self ::EDOM ,
Errno ::ERANGE = > Self ::ERANGE ,
Errno ::EDEADLK = > Self ::EDEADLK ,
Errno ::ENAMETOOLONG = > Self ::ENAMETOOLONG ,
Errno ::ENOLCK = > Self ::ENOLCK ,
Errno ::ENOSYS = > Self ::ENOSYS ,
Errno ::ENOTEMPTY = > Self ::ENOTEMPTY ,
Errno ::ELOOP = > Self ::ELOOP ,
Errno ::ENOMSG = > Self ::ENOMSG ,
Errno ::EIDRM = > Self ::EIDRM ,
Errno ::ENOLINK = > Self ::ENOLINK ,
Errno ::EPROTO = > Self ::EPROTO ,
Errno ::EMULTIHOP = > Self ::EMULTIHOP ,
Errno ::EBADMSG = > Self ::EBADMSG ,
Errno ::EOVERFLOW = > Self ::EOVERFLOW ,
Errno ::EILSEQ = > Self ::EILSEQ ,
Errno ::ENOTSOCK = > Self ::ENOTSOCK ,
Errno ::EDESTADDRREQ = > Self ::EDESTADDRREQ ,
Errno ::EMSGSIZE = > Self ::EMSGSIZE ,
Errno ::EPROTOTYPE = > Self ::EPROTOTYPE ,
Errno ::ENOPROTOOPT = > Self ::ENOPROTOOPT ,
Errno ::EPROTONOSUPPORT = > Self ::EPROTONOSUPPORT ,
Errno ::EAFNOSUPPORT = > Self ::EAFNOSUPPORT ,
Errno ::EADDRINUSE = > Self ::EADDRINUSE ,
Errno ::EADDRNOTAVAIL = > Self ::EADDRNOTAVAIL ,
Errno ::ENETDOWN = > Self ::ENETDOWN ,
Errno ::ENETUNREACH = > Self ::ENETUNREACH ,
Errno ::ENETRESET = > Self ::ENETRESET ,
Errno ::ECONNABORTED = > Self ::ECONNABORTED ,
Errno ::ECONNRESET = > Self ::ECONNRESET ,
Errno ::ENOBUFS = > Self ::ENOBUFS ,
Errno ::EISCONN = > Self ::EISCONN ,
Errno ::ENOTCONN = > Self ::ENOTCONN ,
Errno ::ETIMEDOUT = > Self ::ETIMEDOUT ,
Errno ::ECONNREFUSED = > Self ::ECONNREFUSED ,
Errno ::EHOSTUNREACH = > Self ::EHOSTUNREACH ,
Errno ::EALREADY = > Self ::EALREADY ,
Errno ::EINPROGRESS = > Self ::EINPROGRESS ,
Errno ::ESTALE = > Self ::ESTALE ,
Errno ::EDQUOT = > Self ::EDQUOT ,
Errno ::ECANCELED = > Self ::ECANCELED ,
Errno ::EOWNERDEAD = > Self ::EOWNERDEAD ,
Errno ::ENOTRECOVERABLE = > Self ::ENOTRECOVERABLE ,
}
}
}