From 98a20b8ba468d47c098d067f089b27c5c89815d9 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Tue, 9 May 2023 00:31:33 +0300 Subject: trans: Port to x86_64 Message-Id: <20230508213136.608575-39-bugaevc@gmail.com> --- trans/fifo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'trans/fifo.c') diff --git a/trans/fifo.c b/trans/fifo.c index 894565f6..2f199112 100644 --- a/trans/fifo.c +++ b/trans/fifo.c @@ -343,6 +343,7 @@ trivfs_S_io_read (struct trivfs_protid *cred, off_t offs, vm_size_t amount) { error_t err; + size_t data_size = *data_len; if (!cred) err = EOPNOTSUPP; @@ -353,8 +354,9 @@ trivfs_S_io_read (struct trivfs_protid *cred, struct pipe *pipe = cred->po->hook; pthread_mutex_lock (&pipe->lock); err = pipe_read (pipe, cred->po->openmodes & O_NONBLOCK, NULL, - data, data_len, amount); + data, &data_size, amount); pthread_mutex_unlock (&pipe->lock); + *data_len = data_size; } return err; -- cgit v1.2.3