Skip to content
This repository has been archived by the owner on Nov 9, 2019. It is now read-only.

Ambiguous spec of __wasi_fstflags_t #53

Closed
marmistrz opened this issue Aug 5, 2019 · 3 comments
Closed

Ambiguous spec of __wasi_fstflags_t #53

marmistrz opened this issue Aug 5, 2019 · 3 comments

Comments

@marmistrz
Copy link
Member

marmistrz commented Aug 5, 2019

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

@kubkon
Copy link
Member

kubkon commented Aug 9, 2019

@marmistrz are you going to file an issue in WASI issue tracker as suggested by @sunfishcode? Or @sunfishcode will you do it? Either way, after it happens, I suggest we make references from this one to the one in WASI tracker, and close this one.

@marmistrz
Copy link
Member Author

I will, tomorrow.

@marmistrz
Copy link
Member Author

Closing in favor of bytecodealliance/wasmtime#270

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants