reuse __WASI_EIO error code

This commit is contained in:
newpavlov 2019-10-28 18:37:14 +03:00
parent b67f2c9f18
commit 8e6f4c448b
2 changed files with 1 additions and 2 deletions

View File

@ -2462,7 +2462,7 @@ pub fn random_get(ctx: &mut Ctx, buf: WasmPtr<u8, Array>, buf_len: u32) -> __was
}; };
match res { match res {
Ok(()) => __WASI_ESUCCESS, Ok(()) => __WASI_ESUCCESS,
Err(_) => __WASI_ERNGFAILURE, Err(_) => __WASI_EIO,
} }
} }

View File

@ -147,7 +147,6 @@ pub const __WASI_ETIMEDOUT: u16 = 73;
pub const __WASI_ETXTBSY: u16 = 74; pub const __WASI_ETXTBSY: u16 = 74;
pub const __WASI_EXDEV: u16 = 75; pub const __WASI_EXDEV: u16 = 75;
pub const __WASI_ENOTCAPABLE: u16 = 76; pub const __WASI_ENOTCAPABLE: u16 = 76;
pub const __WASI_ERNGFAILURE: u16 = 77;
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[repr(C)] #[repr(C)]