Skip to content

Commit b86467f

Browse files
rvolosatovsdeadprogram
authored andcommitted
syscall: group WASI consts by purpose
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent 13a16af commit b86467f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/syscall/syscall_libc_wasi.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,23 @@ const (
5050
)
5151

5252
const (
53-
__WASI_OFLAGS_CREAT = 1
54-
__WASI_FDFLAGS_APPEND = 1
55-
__WASI_OFLAGS_EXCL = 4
56-
__WASI_OFLAGS_TRUNC = 8
57-
__WASI_FDFLAGS_SYNC = 16
53+
__WASI_OFLAGS_CREAT = 1
54+
__WASI_OFLAGS_EXCL = 4
55+
__WASI_OFLAGS_TRUNC = 8
56+
57+
__WASI_FDFLAGS_APPEND = 1
58+
__WASI_FDFLAGS_SYNC = 16
5859

5960
O_RDONLY = 0x04000000
6061
O_WRONLY = 0x10000000
6162
O_RDWR = O_RDONLY | O_WRONLY
6263

63-
O_CREAT = __WASI_OFLAGS_CREAT << 12
64-
O_TRUNC = __WASI_OFLAGS_TRUNC << 12
65-
O_APPEND = __WASI_FDFLAGS_APPEND
66-
O_EXCL = __WASI_OFLAGS_EXCL << 12
67-
O_SYNC = __WASI_FDFLAGS_SYNC
64+
O_CREAT = __WASI_OFLAGS_CREAT << 12
65+
O_TRUNC = __WASI_OFLAGS_TRUNC << 12
66+
O_EXCL = __WASI_OFLAGS_EXCL << 12
67+
68+
O_APPEND = __WASI_FDFLAGS_APPEND
69+
O_SYNC = __WASI_FDFLAGS_SYNC
6870

6971
O_CLOEXEC = 0
7072

0 commit comments

Comments
 (0)