| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f8aa365 commit 32805a9
27 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,33 +6,22 @@ | |||
| 6 | 6 | #include "wasi_types.h" | |
| 7 | 7 | #include "uv_mapping.h" | |
| 8 | 8 | ||
| 9 | - /* TODO(cjihrig): PATH_MAX_BYTES shouldn't be stack allocated. On Windows, paths | ||
| 10 | - can be 32k long, and this PATH_MAX_BYTES is an artificial limitation. */ | ||
| 11 | - #ifdef _WIN32 | ||
| 12 | - /* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */ | ||
| 13 | - # define PATH_MAX_BYTES (MAX_PATH * 4) | ||
| 14 | - #else | ||
| 15 | - # include <limits.h> | ||
| 16 | - # define PATH_MAX_BYTES (PATH_MAX) | ||
| 17 | - #endif | ||
| 18 | - | ||
| 19 | 9 | struct uvwasi_s; | |
| 20 | 10 | ||
| 21 | 11 | struct uvwasi_fd_wrap_t { | |
| 22 | 12 | uvwasi_fd_t id; | |
| 23 | 13 | uv_file fd; | |
| 24 | - char path[PATH_MAX_BYTES]; | ||
| 25 | - char real_path[PATH_MAX_BYTES]; | ||
| 14 | + char* path; | ||
| 15 | + char* real_path; | ||
| 26 | 16 | uvwasi_filetype_t type; | |
| 27 | 17 | uvwasi_rights_t rights_base; | |
| 28 | 18 | uvwasi_rights_t rights_inheriting; | |
| 29 | 19 | int preopen; | |
| 30 | - int valid; | ||
| 31 | 20 | uv_mutex_t mutex; | |
| 32 | 21 | }; | |
| 33 | 22 | ||
| 34 | 23 | struct uvwasi_fd_table_t { | |
| 35 | - struct uvwasi_fd_wrap_t* fds; | ||
| 24 | + struct uvwasi_fd_wrap_t** fds; | ||
| 36 | 25 | uint32_t size; | |
| 37 | 26 | uint32_t used; | |
| 38 | 27 | uv_rwlock_t rwlock; | |
@@ -61,7 +50,8 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, | |||
| 61 | 50 | struct uvwasi_fd_wrap_t** wrap, | |
| 62 | 51 | uvwasi_rights_t rights_base, | |
| 63 | 52 | uvwasi_rights_t rights_inheriting); | |
| 64 | - uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, | ||
| 53 | + uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_s* uvwasi, | ||
| 54 | + struct uvwasi_fd_table_t* table, | ||
| 65 | 55 | const uvwasi_fd_t id); | |
| 66 | 56 | ||
| 67 | 57 | #endif /* __UVWASI_FD_TABLE_H__ */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ extern "C" { | |||
| 11 | 11 | ||
| 12 | 12 | #define UVWASI_VERSION_MAJOR 0 | |
| 13 | 13 | #define UVWASI_VERSION_MINOR 0 | |
| 14 | - #define UVWASI_VERSION_PATCH 1 | ||
| 14 | + #define UVWASI_VERSION_PATCH 3 | ||
| 15 | 15 | #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ | |
| 16 | 16 | (UVWASI_VERSION_MINOR << 8) | \ | |
| 17 | 17 | (UVWASI_VERSION_PATCH)) | |
@@ -20,7 +20,7 @@ extern "C" { | |||
| 20 | 20 | #define UVWASI_VERSION_STRING UVWASI_STRINGIFY(UVWASI_VERSION_MAJOR) "." \ | |
| 21 | 21 | UVWASI_STRINGIFY(UVWASI_VERSION_MINOR) "." \ | |
| 22 | 22 | UVWASI_STRINGIFY(UVWASI_VERSION_PATCH) | |
| 23 | - #define UVWASI_VERSION_WASI "snapshot_0" | ||
| 23 | + #define UVWASI_VERSION_WASI "snapshot_1" | ||
| 24 | 24 | ||
| 25 | 25 | typedef void* (*uvwasi_malloc)(size_t size, void* mem_user_data); | |
| 26 | 26 | typedef void (*uvwasi_free)(void* ptr, void* mem_user_data); | |
@@ -69,6 +69,7 @@ void uvwasi_destroy(uvwasi_t* uvwasi); | |||
| 69 | 69 | uvwasi_errno_t uvwasi_embedder_remap_fd(uvwasi_t* uvwasi, | |
| 70 | 70 | const uvwasi_fd_t fd, | |
| 71 | 71 | uv_file new_host_fd); | |
| 72 | + const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code); | ||
| 72 | 73 | ||
| 73 | 74 | ||
| 74 | 75 | // WASI system call API. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -155,7 +155,7 @@ typedef struct uvwasi_iovec_s { | |||
| 155 | 155 | size_t buf_len; | |
| 156 | 156 | } uvwasi_iovec_t; | |
| 157 | 157 | ||
| 158 | - typedef uint32_t uvwasi_linkcount_t; | ||
| 158 | + typedef uint64_t uvwasi_linkcount_t; | ||
| 159 | 159 | ||
| 160 | 160 | typedef uint32_t uvwasi_lookupflags_t; /* Bitfield */ | |
| 161 | 161 | #define UVWASI_LOOKUP_SYMLINK_FOLLOW (1 << 0) | |
@@ -266,7 +266,6 @@ typedef struct uvwasi_subscription_s { | |||
| 266 | 266 | uvwasi_eventtype_t type; | |
| 267 | 267 | union { | |
| 268 | 268 | struct { | |
| 269 | - uvwasi_userdata_t identifier; | ||
| 270 | 269 | uvwasi_clockid_t clock_id; | |
| 271 | 270 | uvwasi_timestamp_t timeout; | |
| 272 | 271 | uvwasi_timestamp_t precision; | |
@@ -316,8 +315,8 @@ typedef struct uvwasi_event_s { | |||
| 316 | 315 | } uvwasi_event_t; | |
| 317 | 316 | ||
| 318 | 317 | typedef uint8_t uvwasi_whence_t; | |
| 319 | - #define UVWASI_WHENCE_CUR 0 | ||
| 320 | - #define UVWASI_WHENCE_END 1 | ||
| 321 | - #define UVWASI_WHENCE_SET 2 | ||
| 318 | + #define UVWASI_WHENCE_SET 0 | ||
| 319 | + #define UVWASI_WHENCE_CUR 1 | ||
| 320 | + #define UVWASI_WHENCE_END 2 | ||
| 322 | 321 | ||
| 323 | 322 | #endif /* __UVWASI_WASI_TYPES_H__ */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -187,12 +187,29 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, | |||
| 187 | 187 | int preopen, | |
| 188 | 188 | struct uvwasi_fd_wrap_t** wrap) { | |
| 189 | 189 | struct uvwasi_fd_wrap_t* entry; | |
| 190 | - struct uvwasi_fd_wrap_t* new_fds; | ||
| 190 | + struct uvwasi_fd_wrap_t** new_fds; | ||
| 191 | 191 | uvwasi_errno_t err; | |
| 192 | 192 | uint32_t new_size; | |
| 193 | 193 | int index; | |
| 194 | 194 | uint32_t i; | |
| 195 | 195 | int r; | |
| 196 | + size_t mp_len; | ||
| 197 | + char* mp_copy; | ||
| 198 | + size_t rp_len; | ||
| 199 | + char* rp_copy; | ||
| 200 | + | ||
| 201 | + mp_len = strlen(mapped_path); | ||
| 202 | + rp_len = strlen(real_path); | ||
| 203 | + entry = (struct uvwasi_fd_wrap_t*) | ||
| 204 | + uvwasi__malloc(uvwasi, sizeof(*entry) + mp_len + rp_len + 2); | ||
| 205 | + if (entry == NULL) return UVWASI_ENOMEM; | ||
| 206 | + | ||
| 207 | + mp_copy = (char*)(entry + 1); | ||
| 208 | + rp_copy = mp_copy + mp_len + 1; | ||
| 209 | + memcpy(mp_copy, mapped_path, mp_len); | ||
| 210 | + mp_copy[mp_len] = '\0'; | ||
| 211 | + memcpy(rp_copy, real_path, rp_len); | ||
| 212 | + rp_copy[rp_len] = '\0'; | ||
| 196 | 213 | ||
| 197 | 214 | uv_rwlock_wrlock(&table->rwlock); | |
| 198 | 215 | ||
@@ -201,12 +218,13 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, | |||
| 201 | 218 | new_size = table->size * 2; | |
| 202 | 219 | new_fds = uvwasi__realloc(uvwasi, table->fds, new_size * sizeof(*new_fds)); | |
| 203 | 220 | if (new_fds == NULL) { | |
| 221 | + uvwasi__free(uvwasi, entry); | ||
| 204 | 222 | err = UVWASI_ENOMEM; | |
| 205 | 223 | goto exit; | |
| 206 | 224 | } | |
| 207 | 225 | ||
| 208 | 226 | for (i = table->size; i < new_size; ++i) | |
| 209 | - new_fds[i].valid = 0; | ||
| 227 | + new_fds[i] = NULL; | ||
| 210 | 228 | ||
| 211 | 229 | index = table->size; | |
| 212 | 230 | table->fds = new_fds; | |
@@ -215,20 +233,21 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, | |||
| 215 | 233 | /* The table is big enough, so find an empty slot for the new data. */ | |
| 216 | 234 | index = -1; | |
| 217 | 235 | for (i = 0; i < table->size; ++i) { | |
| 218 | - if (table->fds[i].valid != 1) { | ||
| 236 | + if (table->fds[i] == NULL) { | ||
| 219 | 237 | index = i; | |
| 220 | 238 | break; | |
| 221 | 239 | } | |
| 222 | 240 | } | |
| 223 | 241 | ||
| 224 | 242 | /* index should never be -1. */ | |
| 225 | 243 | if (index == -1) { | |
| 244 | + uvwasi__free(uvwasi, entry); | ||
| 226 | 245 | err = UVWASI_ENOSPC; | |
| 227 | 246 | goto exit; | |
| 228 | 247 | } | |
| 229 | 248 | } | |
| 230 | 249 | ||
| 231 | - entry = &table->fds[index]; | ||
| 250 | + table->fds[index] = entry; | ||
| 232 | 251 | ||
| 233 | 252 | r = uv_mutex_init(&entry->mutex); | |
| 234 | 253 | if (r != 0) { | |
@@ -238,13 +257,12 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, | |||
| 238 | 257 | ||
| 239 | 258 | entry->id = index; | |
| 240 | 259 | entry->fd = fd; | |
| 241 | - strcpy(entry->path, mapped_path); | ||
| 242 | - strcpy(entry->real_path, real_path); | ||
| 260 | + entry->path = mp_copy; | ||
| 261 | + entry->real_path = rp_copy; | ||
| 243 | 262 | entry->type = type; | |
| 244 | 263 | entry->rights_base = rights_base; | |
| 245 | 264 | entry->rights_inheriting = rights_inheriting; | |
| 246 | 265 | entry->preopen = preopen; | |
| 247 | - entry->valid = 1; | ||
| 248 | 266 | table->used++; | |
| 249 | 267 | ||
| 250 | 268 | if (wrap != NULL) | |
@@ -281,7 +299,7 @@ uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi, | |||
| 281 | 299 | table->size = init_size; | |
| 282 | 300 | table->fds = uvwasi__calloc(uvwasi, | |
| 283 | 301 | init_size, | |
| 284 | - sizeof(struct uvwasi_fd_wrap_t)); | ||
| 302 | + sizeof(struct uvwasi_fd_wrap_t*)); | ||
| 285 | 303 | ||
| 286 | 304 | if (table->fds == NULL) { | |
| 287 | 305 | err = UVWASI_ENOMEM; | |
@@ -325,9 +343,20 @@ uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi, | |||
| 325 | 343 | ||
| 326 | 344 | ||
| 327 | 345 | void uvwasi_fd_table_free(uvwasi_t* uvwasi, struct uvwasi_fd_table_t* table) { | |
| 346 | + struct uvwasi_fd_wrap_t* entry; | ||
| 347 | + uint32_t i; | ||
| 348 | + | ||
| 328 | 349 | if (table == NULL) | |
| 329 | 350 | return; | |
| 330 | 351 | ||
| 352 | + for (i = 0; i < table->size; i++) { | ||
| 353 | + entry = table->fds[i]; | ||
| 354 | + if (entry == NULL) continue; | ||
| 355 | + | ||
| 356 | + uv_mutex_destroy(&entry->mutex); | ||
| 357 | + uvwasi__free(uvwasi, entry); | ||
| 358 | + } | ||
| 359 | + | ||
| 331 | 360 | uvwasi__free(uvwasi, table->fds); | |
| 332 | 361 | table->fds = NULL; | |
| 333 | 362 | table->size = 0; | |
@@ -430,9 +459,9 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, | |||
| 430 | 459 | goto exit; | |
| 431 | 460 | } | |
| 432 | 461 | ||
| 433 | - entry = &table->fds[id]; | ||
| 462 | + entry = table->fds[id]; | ||
| 434 | 463 | ||
| 435 | - if (entry->valid != 1 || entry->id != id) { | ||
| 464 | + if (entry == NULL || entry->id != id) { | ||
| 436 | 465 | err = UVWASI_EBADF; | |
| 437 | 466 | goto exit; | |
| 438 | 467 | } | |
@@ -453,7 +482,8 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, | |||
| 453 | 482 | } | |
| 454 | 483 | ||
| 455 | 484 | ||
| 456 | - uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, | ||
| 485 | + uvwasi_errno_t uvwasi_fd_table_remove(uvwasi_t* uvwasi, | ||
| 486 | + struct uvwasi_fd_table_t* table, | ||
| 457 | 487 | const uvwasi_fd_t id) { | |
| 458 | 488 | struct uvwasi_fd_wrap_t* entry; | |
| 459 | 489 | uvwasi_errno_t err; | |
@@ -468,15 +498,16 @@ uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, | |||
| 468 | 498 | goto exit; | |
| 469 | 499 | } | |
| 470 | 500 | ||
| 471 | - entry = &table->fds[id]; | ||
| 501 | + entry = table->fds[id]; | ||
| 472 | 502 | ||
| 473 | - if (entry->valid != 1 || entry->id != id) { | ||
| 503 | + if (entry == NULL || entry->id != id) { | ||
| 474 | 504 | err = UVWASI_EBADF; | |
| 475 | 505 | goto exit; | |
| 476 | 506 | } | |
| 477 | 507 | ||
| 478 | 508 | uv_mutex_destroy(&entry->mutex); | |
| 479 | - entry->valid = 0; | ||
| 509 | + uvwasi__free(uvwasi, entry); | ||
| 510 | + table->fds[id] = NULL; | ||
| 480 | 511 | table->used--; | |
| 481 | 512 | err = UVWASI_ESUCCESS; | |
| 482 | 513 | exit: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,16 @@ | |||
| 25 | 25 | #include "fd_table.h" | |
| 26 | 26 | #include "clocks.h" | |
| 27 | 27 | ||
| 28 | + /* TODO(cjihrig): PATH_MAX_BYTES shouldn't be stack allocated. On Windows, paths | ||
| 29 | + can be 32k long, and this PATH_MAX_BYTES is an artificial limitation. */ | ||
| 30 | + #ifdef _WIN32 | ||
| 31 | + /* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */ | ||
| 32 | + # define PATH_MAX_BYTES (MAX_PATH * 4) | ||
| 33 | + #else | ||
| 34 | + # include <limits.h> | ||
| 35 | + # define PATH_MAX_BYTES (PATH_MAX) | ||
| 36 | + #endif | ||
| 37 | + | ||
| 28 | 38 | static void* default_malloc(size_t size, void* mem_user_data) { | |
| 29 | 39 | return malloc(size); | |
| 30 | 40 | } | |
@@ -688,7 +698,7 @@ uvwasi_errno_t uvwasi_fd_close(uvwasi_t* uvwasi, uvwasi_fd_t fd) { | |||
| 688 | 698 | if (r != 0) | |
| 689 | 699 | return uvwasi__translate_uv_error(r); | |
| 690 | 700 | ||
| 691 | - return uvwasi_fd_table_remove(&uvwasi->fds, fd); | ||
| 701 | + return uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, fd); | ||
| 692 | 702 | } | |
| 693 | 703 | ||
| 694 | 704 | ||
@@ -1319,7 +1329,7 @@ uvwasi_errno_t uvwasi_fd_renumber(uvwasi_t* uvwasi, | |||
| 1319 | 1329 | to_wrap->id = to; | |
| 1320 | 1330 | uv_mutex_unlock(&from_wrap->mutex); | |
| 1321 | 1331 | uv_mutex_unlock(&to_wrap->mutex); | |
| 1322 | - return uvwasi_fd_table_remove(&uvwasi->fds, from); | ||
| 1332 | + return uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, from); | ||
| 1323 | 1333 | } | |
| 1324 | 1334 | ||
| 1325 | 1335 | ||
@@ -1773,7 +1783,7 @@ uvwasi_errno_t uvwasi_path_open(uvwasi_t* uvwasi, | |||
| 1773 | 1783 | if ((o_flags & UVWASI_O_DIRECTORY) != 0 && | |
| 1774 | 1784 | wrap.type != UVWASI_FILETYPE_DIRECTORY) { | |
| 1775 | 1785 | uv_mutex_unlock(&dirfd_wrap->mutex); | |
| 1776 | - uvwasi_fd_table_remove(&uvwasi->fds, wrap.id); | ||
| 1786 | + uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, wrap.id); | ||
| 1777 | 1787 | err = UVWASI_ENOTDIR; | |
| 1778 | 1788 | goto close_file_and_error_exit; | |
| 1779 | 1789 | } | |
@@ -2140,3 +2150,90 @@ uvwasi_errno_t uvwasi_sock_shutdown(uvwasi_t* uvwasi, | |||
| 2140 | 2150 | https://github.com/WebAssembly/WASI/issues/4 */ | |
| 2141 | 2151 | return UVWASI_ENOTSUP; | |
| 2142 | 2152 | } | |
| 2153 | + | ||
| 2154 | + | ||
| 2155 | + const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code) { | ||
| 2156 | + switch (code) { | ||
| 2157 | + #define V(errcode) case errcode: return #errcode; | ||
| 2158 | + V(UVWASI_E2BIG) | ||
| 2159 | + V(UVWASI_EACCES) | ||
| 2160 | + V(UVWASI_EADDRINUSE) | ||
| 2161 | + V(UVWASI_EADDRNOTAVAIL) | ||
| 2162 | + V(UVWASI_EAFNOSUPPORT) | ||
| 2163 | + V(UVWASI_EAGAIN) | ||
| 2164 | + V(UVWASI_EALREADY) | ||
| 2165 | + V(UVWASI_EBADF) | ||
| 2166 | + V(UVWASI_EBADMSG) | ||
| 2167 | + V(UVWASI_EBUSY) | ||
| 2168 | + V(UVWASI_ECANCELED) | ||
| 2169 | + V(UVWASI_ECHILD) | ||
| 2170 | + V(UVWASI_ECONNABORTED) | ||
| 2171 | + V(UVWASI_ECONNREFUSED) | ||
| 2172 | + V(UVWASI_ECONNRESET) | ||
| 2173 | + V(UVWASI_EDEADLK) | ||
| 2174 | + V(UVWASI_EDESTADDRREQ) | ||
| 2175 | + V(UVWASI_EDOM) | ||
| 2176 | + V(UVWASI_EDQUOT) | ||
| 2177 | + V(UVWASI_EEXIST) | ||
| 2178 | + V(UVWASI_EFAULT) | ||
| 2179 | + V(UVWASI_EFBIG) | ||
| 2180 | + V(UVWASI_EHOSTUNREACH) | ||
| 2181 | + V(UVWASI_EIDRM) | ||
| 2182 | + V(UVWASI_EILSEQ) | ||
| 2183 | + V(UVWASI_EINPROGRESS) | ||
| 2184 | + V(UVWASI_EINTR) | ||
| 2185 | + V(UVWASI_EINVAL) | ||
| 2186 | + V(UVWASI_EIO) | ||
| 2187 | + V(UVWASI_EISCONN) | ||
| 2188 | + V(UVWASI_EISDIR) | ||
| 2189 | + V(UVWASI_ELOOP) | ||
| 2190 | + V(UVWASI_EMFILE) | ||
| 2191 | + V(UVWASI_EMLINK) | ||
| 2192 | + V(UVWASI_EMSGSIZE) | ||
| 2193 | + V(UVWASI_EMULTIHOP) | ||
| 2194 | + V(UVWASI_ENAMETOOLONG) | ||
| 2195 | + V(UVWASI_ENETDOWN) | ||
| 2196 | + V(UVWASI_ENETRESET) | ||
| 2197 | + V(UVWASI_ENETUNREACH) | ||
| 2198 | + V(UVWASI_ENFILE) | ||
| 2199 | + V(UVWASI_ENOBUFS) | ||
| 2200 | + V(UVWASI_ENODEV) | ||
| 2201 | + V(UVWASI_ENOENT) | ||
| 2202 | + V(UVWASI_ENOEXEC) | ||
| 2203 | + V(UVWASI_ENOLCK) | ||
| 2204 | + V(UVWASI_ENOLINK) | ||
| 2205 | + V(UVWASI_ENOMEM) | ||
| 2206 | + V(UVWASI_ENOMSG) | ||
| 2207 | + V(UVWASI_ENOPROTOOPT) | ||
| 2208 | + V(UVWASI_ENOSPC) | ||
| 2209 | + V(UVWASI_ENOSYS) | ||
| 2210 | + V(UVWASI_ENOTCONN) | ||
| 2211 | + V(UVWASI_ENOTDIR) | ||
| 2212 | + V(UVWASI_ENOTEMPTY) | ||
| 2213 | + V(UVWASI_ENOTRECOVERABLE) | ||
| 2214 | + V(UVWASI_ENOTSOCK) | ||
| 2215 | + V(UVWASI_ENOTSUP) | ||
| 2216 | + V(UVWASI_ENOTTY) | ||
| 2217 | + V(UVWASI_ENXIO) | ||
| 2218 | + V(UVWASI_EOVERFLOW) | ||
| 2219 | + V(UVWASI_EOWNERDEAD) | ||
| 2220 | + V(UVWASI_EPERM) | ||
| 2221 | + V(UVWASI_EPIPE) | ||
| 2222 | + V(UVWASI_EPROTO) | ||
| 2223 | + V(UVWASI_EPROTONOSUPPORT) | ||
| 2224 | + V(UVWASI_EPROTOTYPE) | ||
| 2225 | + V(UVWASI_ERANGE) | ||
| 2226 | + V(UVWASI_EROFS) | ||
| 2227 | + V(UVWASI_ESPIPE) | ||
| 2228 | + V(UVWASI_ESRCH) | ||
| 2229 | + V(UVWASI_ESTALE) | ||
| 2230 | + V(UVWASI_ETIMEDOUT) | ||
| 2231 | + V(UVWASI_ETXTBSY) | ||
| 2232 | + V(UVWASI_EXDEV) | ||
| 2233 | + V(UVWASI_ENOTCAPABLE) | ||
| 2234 | + V(UVWASI_ESUCCESS) | ||
| 2235 | + #undef V | ||
| 2236 | + default: | ||
| 2237 | + return "UVWASI_UNKNOWN_ERROR"; | ||
| 2238 | + } | ||
| 2239 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments