| 201 | } |
| 202 | |
| 203 | int _wasmfs_read(int fd, void* buf, size_t count) { |
| 204 | __wasi_iovec_t iovs[1]; |
| 205 | iovs[0].buf = (uint8_t*)buf; |
| 206 | iovs[0].buf_len = count; |
| 207 | |
| 208 | __wasi_size_t numBytes; |
| 209 | __wasi_errno_t err = __wasi_fd_read(fd, iovs, 1, &numBytes); |
| 210 | if (err) { |
| 211 | return -err; |
| 212 | } |
| 213 | return numBytes; |
| 214 | } |
| 215 | |
| 216 | int _wasmfs_pread(int fd, void* buf, size_t count, off_t offset) { |
| 217 | __wasi_iovec_t iovs[1]; |
nothing calls this directly
no test coverage detected