| 361 | } |
| 362 | |
| 363 | static int fs_write(FSDevice *fs, FSFile *f, uint64_t offset, |
| 364 | const uint8_t *buf, int count) |
| 365 | { |
| 366 | int ret; |
| 367 | |
| 368 | if (!f->is_opened || f->is_dir) |
| 369 | return -P9_EPROTO; |
| 370 | ret = pwrite(f->u.fd, buf, count, offset); |
| 371 | if (ret < 0) |
| 372 | return -errno_to_p9(errno); |
| 373 | else |
| 374 | return ret; |
| 375 | } |
| 376 | |
| 377 | static void fs_close(FSDevice *fs, FSFile *f) |
| 378 | { |
nothing calls this directly
no test coverage detected