From 9b1cd4bc7bc44a0e8a46612d96dc5215b94df65b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 9 Apr 2019 12:19:02 -0700 Subject: [PATCH] Document __wasi_preopentype_t and __wasi_prestat_t. --- docs/WASI-api.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/WASI-api.md b/docs/WASI-api.md index 0c721bacd5..96f800a8fa 100644 --- a/docs/WASI-api.md +++ b/docs/WASI-api.md @@ -1837,6 +1837,36 @@ Possible values: Truncate file to size 0. +### `__wasi_preopentype_t` (`uint8_t`) + +Preopened resource type. + +Used by [`__wasi_prestat_t`](#prestat). + +Possible values: + +- **`__WASI_PREOPENTYPE_DIR`** + + Preopened directory. + +### `__wasi_prestat_t` (`struct`) + +Information about a preopened resource. + +Used by [`__wasi_fd_prestat_get()`](#fd_prestat_get). + +Members: + +- [\_\_wasi\_preopentype\_t](#preopentype) pr\_type + + The type of the preopened resource. + +- When `pr_type` is [`__WASI_PREOPENTYPE_DIR`](#preopentype.dir): + + - size\_t u.pr\_name\_len + + The length of the preopened directory name. + ### `__wasi_riflags_t` (`uint16_t` bitfield) Flags provided to [`__wasi_sock_recv()`](#sock_recv).