mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Add prestat_t
This commit is contained in:
parent
39ccf403f3
commit
b1030d3181
@ -238,7 +238,7 @@ pub fn fd_pread(
|
||||
pub fn fd_prestat_get(
|
||||
ctx: &mut Ctx,
|
||||
fd: __wasi_fd_t,
|
||||
buf: WasmPtr<__wasi_fdstat_t>,
|
||||
buf: WasmPtr<__wasi_prestat_t>,
|
||||
) -> __wasi_errno_t {
|
||||
unimplemented!()
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ pub const __WASI_DIRCOOKIE_START: u64 = 0;
|
||||
pub struct __wasi_dirent_t {
|
||||
pub d_next: __wasi_dircookie_t,
|
||||
pub d_ino: __wasi_inode_t,
|
||||
pub _namlen: u32,
|
||||
pub d_namlen: u32,
|
||||
pub d_type: __wasi_filetype_t,
|
||||
}
|
||||
|
||||
@ -161,6 +161,28 @@ pub const __WASI_FDFLAG_NONBLOCK: u16 = 1 << 2;
|
||||
pub const __WASI_FDFLAG_RSYNC: u16 = 1 << 3;
|
||||
pub const __WASI_FDFLAG_SYNC: u16 = 1 << 4;
|
||||
|
||||
pub type __wasi_preopentype_t = u8;
|
||||
pub const __WASI_PREOPENTYPE_DIR: u8 = 0;
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
#[repr(C)]
|
||||
pub struct __wasi_prestat_u_dir_t {
|
||||
pr_name_len: u32,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[repr(C)]
|
||||
pub union __wasi_prestat_u {
|
||||
dir: __wasi_prestat_u_dir_t,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[repr(C)]
|
||||
pub struct __wasi_prestat_t {
|
||||
pr_type: __wasi_preopentype_t,
|
||||
u: __wasi_prestat_u,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
#[repr(C)]
|
||||
pub struct __wasi_fdstat_t {
|
||||
|
Loading…
Reference in New Issue
Block a user