Stream: git-wasmtime

Topic: wasmtime / Issue #270 Ambiguous spec of __wasi_fstflags_t


view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2021 at 17:21):

bjorn3 commented on Issue #270:

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

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 18:56):

sunfishcode commented on Issue #270:

Yes; I've now moved it.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2021 at 18:56):

sunfishcode closed Issue #270:

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 https://github.com/CraneStation/wasi-common/pull/54


Last updated: Nov 22 2024 at 16:03 UTC