Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous spec of __wasi_fstflags_t #270

Closed
marmistrz opened this issue Aug 10, 2019 · 2 comments
Closed

Ambiguous spec of __wasi_fstflags_t #270

marmistrz opened this issue Aug 10, 2019 · 2 comments
Labels
wasi:api Issues pertaining to the WASI API, not necessarily specific to Wasmtime.

Comments

@marmistrz
Copy link
Contributor

Possible values:

    __WASI_FILESTAT_SET_ATIM
    Adjust the last data access timestamp to the value stored in __wasi_filestat_t::st_atim.

    __WASI_FILESTAT_SET_ATIM_NOW
    Adjust the last data access timestamp to the time of clock __WASI_CLOCK_REALTIME.

    __WASI_FILESTAT_SET_MTIM
    Adjust the last data modification timestamp to the value stored in __wasi_filestat_t::st_mtim.

    __WASI_FILESTAT_SET_MTIM_NOW
    Adjust the last data modification timestamp to the time of clock __WASI_CLOCK_REALTIME.

It is unclear what the behavior is, when the both flags __WASI_FILESTAT_SET_MTIM and __WASI_FILESTAT_SET_MTIM_NOW are set. Should whichever of them take precedence or should one return EINVAL? This should be clarified in the API docs.

I suggest we return EINVAL, which is the behaviorimplemented in CraneStation/wasi-common#54

@sunfishcode sunfishcode added the wasi:api Issues pertaining to the WASI API, not necessarily specific to Wasmtime. label Sep 26, 2019
@bjorn3
Copy link
Contributor

bjorn3 commented Feb 3, 2021

Should this be moved to https://github.com/WebAssembly/WASI and is this even still a problem.

@sunfishcode
Copy link
Member

Yes; I've now moved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi:api Issues pertaining to the WASI API, not necessarily specific to Wasmtime.
Projects
None yet
Development

No branches or pull requests

3 participants