From c4194de276a50cc274ed77aa05e0e19325c1c123 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 31 Jan 2020 20:47:59 -0500 Subject: [PATCH 1/2] update fd_permissions_set() signature It appears that the permissions argument to permissions_set() was labeled as an output instead of an input. --- phases/ephemeral/witx/wasi_ephemeral_fd.witx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phases/ephemeral/witx/wasi_ephemeral_fd.witx b/phases/ephemeral/witx/wasi_ephemeral_fd.witx index abd5cf610..e92dd4f91 100644 --- a/phases/ephemeral/witx/wasi_ephemeral_fd.witx +++ b/phases/ephemeral/witx/wasi_ephemeral_fd.witx @@ -122,7 +122,7 @@ (@interface func (export "permissions_set") (param $fd $fd) ;;; The permissions associated with the file. - (result $permissions $permissions) + (param $permissions $permissions) (result $error $errno) ) From a3b8cb7b2f3bea4f6c491646199add090688948c Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 31 Jan 2020 20:52:43 -0500 Subject: [PATCH 2/2] regenerate docs --- phases/ephemeral/docs.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/phases/ephemeral/docs.md b/phases/ephemeral/docs.md index 4fd0305ed..691ee6adf 100644 --- a/phases/ephemeral/docs.md +++ b/phases/ephemeral/docs.md @@ -308,7 +308,7 @@ The right to invoke `fd_allocate`. The right to invoke `path_create_directory`. - `path_create_file` -If `path_open` is set, the right to invoke `path_open` with [`oflags::creat`](#oflags.creat). +If `path_open` is set, the right to invoke `path_open` with [`oflags::create`](#oflags.create). - `path_link_source` The right to invoke `path_link` with the file descriptor as the @@ -568,7 +568,7 @@ As long as the resolved path corresponds to a symbolic link, it is expanded. Open flags used by `path_open`. ### Flags -- `creat` +- `create` Create file if it does not exist. - `directory` @@ -740,7 +740,7 @@ The contents of a $subscription when type is type is [`eventtype::fd_read`](#eventtype.fd_read) or [`eventtype::fd_write`](#eventtype.fd_write). ### Struct members -- `file_descriptor`: [`fd`](#fd) +- `fd`: [`fd`](#fd) The file descriptor on which to wait for it to become ready for reading or writing. ## `subscription_u`: Union @@ -1122,7 +1122,7 @@ A bitmask indicating which timestamps to adjust. --- -#### `permissions_set(fd: fd) -> (permissions, errno)` +#### `permissions_set(fd: fd, permissions: permissions) -> errno` Set the permissions of a file or directory. This sets the permissions associated with a file or directory in @@ -1139,10 +1139,10 @@ umask to determine which of the user/group/other flags to modify. ##### Params - `fd`: [`fd`](#fd) -##### Results - `permissions`: [`permissions`](#permissions) The permissions associated with the file. +##### Results - `error`: [`errno`](#errno) @@ -1687,7 +1687,7 @@ The exit code returned by the process. --- -#### `get(buf: Pointer, buf_len: size) -> errno` +#### `get(buf: Pointer, buf_len: size) -> errno` Write high-quality random data into a buffer. This function blocks when the implementation is unable to immediately provide sufficient high-quality random data. @@ -1696,7 +1696,7 @@ required, it's advisable to use this function to seed a pseudo-random number generator, rather than to provide the random data directly. ##### Params -- `buf`: `Pointer` +- `buf`: `Pointer` The buffer to fill with random data. - `buf_len`: [`size`](#size)