| 152 | } |
| 153 | |
| 154 | int _wasmfs_write(int fd, void* buf, size_t count) { |
| 155 | __wasi_ciovec_t iovs[1]; |
| 156 | iovs[0].buf = (uint8_t*)buf; |
| 157 | iovs[0].buf_len = count; |
| 158 | |
| 159 | __wasi_size_t numBytes; |
| 160 | __wasi_errno_t err = __wasi_fd_write(fd, iovs, 1, &numBytes); |
| 161 | if (err) { |
| 162 | return -err; |
| 163 | } |
| 164 | return numBytes; |
| 165 | } |
| 166 | |
| 167 | int _wasmfs_pwrite(int fd, void* buf, size_t count, off_t offset) { |
| 168 | __wasi_ciovec_t iovs[1]; |
nothing calls this directly
no test coverage detected