diff --git a/host/src/filesystem.rs b/host/src/filesystem.rs index 52b48ad5..dbf889e6 100644 --- a/host/src/filesystem.rs +++ b/host/src/filesystem.rs @@ -30,10 +30,10 @@ impl wasi_filesystem::WasiFilesystem for WasiCtx { todo!() } - fn fd_info( + fn info( &mut self, fd: wasi_filesystem::Descriptor, - ) -> HostResult { + ) -> HostResult { todo!() } diff --git a/src/lib.rs b/src/lib.rs index 0b698df5..0adf33a7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -248,7 +248,7 @@ pub unsafe extern "C" fn fd_datasync(fd: Fd) -> Errno { pub unsafe extern "C" fn fd_fdstat_get(fd: Fd, stat: *mut Fdstat) -> Errno { match Descriptor::get(fd) { Descriptor::File(file) => { - let info = match wasi_filesystem::fd_info(file.fd) { + let info = match wasi_filesystem::info(file.fd) { Ok(info) => info, Err(err) => return errno_from_wasi_filesystem(err), }; diff --git a/wit/wasi-filesystem.wit.md b/wit/wasi-filesystem.wit.md index b3caf034..589e1895 100644 --- a/wit/wasi-filesystem.wit.md +++ b/wit/wasi-filesystem.wit.md @@ -46,12 +46,12 @@ type filedelta = s64 type timestamp = u64 ``` -## `info` +## `fd-info` ```wit /// Information associated with a descriptor. /// /// Note: This was called `fdstat` in earlier versions of WASI. -record info { +record fd-info { /// The type of filesystem object referenced by a descriptor. %type: %type, /// Flags associated with a descriptor. @@ -445,7 +445,7 @@ datasync: func( ) -> result<_, errno> ``` -## `fd-info` +## `info` ```wit /// Get information associated with a descriptor. /// @@ -453,10 +453,10 @@ datasync: func( /// as additional fields. /// /// Note: This was called `fdstat_get` in earlier versions of WASI. -fd-info: func( +info: func( /// The resource to operate on. fd: descriptor, -) -> result +) -> result ``` ## `set-size`