Skip to content

Commit

Permalink
Change the len parameter of fadvise to filesize. (#7)
Browse files Browse the repository at this point in the history
* Change the `len` parameter of `fadvise` to `filesize`.

Fadvise can apply to regions of files larger than the linear memory
address space, so it wants a `filesize` (which is u64) rather than a
`size` (which is u32 on wasm32).

* Update the host implementation accordingly.
  • Loading branch information
sunfishcode authored Nov 23, 2022
1 parent eef567a commit c18bdcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion host/src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ impl wasi_filesystem::WasiFilesystem for WasiCtx {
&mut self,
fd: wasi_filesystem::Descriptor,
offset: wasi_filesystem::Filesize,
len: wasi_filesystem::Size,
len: wasi_filesystem::Filesize,
advice: wasi_filesystem::Advice,
) -> HostResult<(), wasi_filesystem::Errno> {
todo!()
Expand Down

0 comments on commit c18bdcb

Please sign in to comment.