diff options
Diffstat (limited to 'lib9p/tests/test_server/fs_flush.c')
-rw-r--r-- | lib9p/tests/test_server/fs_flush.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib9p/tests/test_server/fs_flush.c b/lib9p/tests/test_server/fs_flush.c index 41156ba..0ae905f 100644 --- a/lib9p/tests/test_server/fs_flush.c +++ b/lib9p/tests/test_server/fs_flush.c @@ -93,8 +93,8 @@ static uint32_t_or_error flush_fio_pwrite(struct flush_fio *LM_UNUSED(self), assert_notreached("not writable"); } -static iovec_or_error flush_fio_pread(struct flush_fio *self, struct lib9p_srv_ctx *ctx, - uint32_t byte_count, uint64_t LM_UNUSED(byte_offset)) { +static error flush_fio_pread(struct flush_fio *self, struct lib9p_srv_ctx *ctx, + lo_interface io_writer dst, uint64_t LM_UNUSED(src_offset), uint32_t byte_count) { assert(self); assert(ctx); @@ -114,14 +114,11 @@ static iovec_or_error flush_fio_pread(struct flush_fio *self, struct lib9p_srv_c /* Return */ switch (self->parent->flush_behavior) { case FLUSH_READ: - return ERROR_NEW_VAL(iovec, ((struct iovec){ - .iov_base = "Sloth\n", - .iov_len = 6 < byte_count ? 6 : byte_count, - })); + return io_write(dst, "Sloth\n", 6 < byte_count ? 6 : byte_count).err; case FLUSH_ERROR: - return ERROR_NEW_ERR(iovec, error_new(E_POSIX_EAGAIN, "request canceled by flush")); + return error_new(E_POSIX_EAGAIN, "request canceled by flush"); case FLUSH_SILENT: - return ERROR_NEW_ERR(iovec, error_new(E_POSIX_ECANCELED, "request canceled by flush")); + return error_new(E_POSIX_ECANCELED, "request canceled by flush"); default: assert_notreached("invalid flush_behavior"); } |