| 141 | } |
| 142 | |
| 143 | int _wasmfs_readlink(const char* path, char** out_ptr) { |
| 144 | static thread_local char* readBuf = (char*)malloc(PATH_MAX); |
| 145 | int bytes = __syscall_readlinkat(AT_FDCWD, path, readBuf, PATH_MAX); |
| 146 | if (bytes < 0) { |
| 147 | return bytes; |
| 148 | } |
| 149 | readBuf[bytes] = '\0'; |
| 150 | *out_ptr = readBuf; |
| 151 | return 0; |
| 152 | } |
| 153 | |
| 154 | int _wasmfs_write(int fd, void* buf, size_t count) { |
| 155 | __wasi_ciovec_t iovs[1]; |
nothing calls this directly
no test coverage detected