Skip to content

Commit

Permalink
rename creat to create
Browse files Browse the repository at this point in the history
This was changed as part of snapshot_preview2.

Refs: #59
  • Loading branch information
cjihrig committed Apr 20, 2020
1 parent e3905cf commit fbec070
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ Used by [`uvwasi_path_open()`](#path_open).

Possible values:

- <a href="#oflags.creat" name="oflags.creat"></a>**`UVWASI_O_CREAT`**
- <a href="#oflags.create" name="oflags.create"></a>**`UVWASI_O_CREATE`**

Create file if it does not exist.

Expand Down Expand Up @@ -2066,7 +2066,7 @@ Possible values:
- <a href="#rights.path_create_file" name="rights.path_create_file"></a>**`UVWASI_RIGHT_PATH_CREATE_FILE`**

If [`UVWASI_RIGHT_PATH_OPEN`](#rights.path_open) is set, the right to invoke
[`uvwasi_path_open()`](#path_open) with [`UVWASI_O_CREAT`](#oflags.creat).
[`uvwasi_path_open()`](#path_open) with [`UVWASI_O_CREATE`](#oflags.create).

- <a href="#rights.path_link_source" name="rights.path_link_source"></a>**`UVWASI_RIGHT_PATH_LINK_SOURCE`**

Expand Down
2 changes: 1 addition & 1 deletion include/wasi_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ typedef uint32_t uvwasi_lookupflags_t; /* Bitfield */
#define UVWASI_LOOKUP_SYMLINK_FOLLOW (1 << 0)

typedef uint16_t uvwasi_oflags_t; /* Bitfield */
#define UVWASI_O_CREAT (1 << 0)
#define UVWASI_O_CREATE (1 << 0)
#define UVWASI_O_DIRECTORY (1 << 1)
#define UVWASI_O_EXCL (1 << 2)
#define UVWASI_O_TRUNC (1 << 3)
Expand Down
2 changes: 1 addition & 1 deletion src/uvwasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1891,7 +1891,7 @@ uvwasi_errno_t uvwasi_path_open(uvwasi_t* uvwasi,
needed_base = UVWASI_RIGHT_PATH_OPEN;
needed_inheriting = fs_rights_base | fs_rights_inheriting;

if ((o_flags & UVWASI_O_CREAT) != 0) {
if ((o_flags & UVWASI_O_CREATE) != 0) {
flags |= UV_FS_O_CREAT;
needed_base |= UVWASI_RIGHT_PATH_CREATE_FILE;
}
Expand Down
2 changes: 1 addition & 1 deletion test/test-basic-file-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(void) {
1,
path,
strlen(path) + 1,
UVWASI_O_CREAT,
UVWASI_O_CREATE,
fs_rights_base,
0,
0,
Expand Down

0 comments on commit fbec070

Please sign in to comment.