[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/41] storeio: Port to x86_64
From: |
Sergey Bugaev |
Subject: |
[PATCH 23/41] storeio: Port to x86_64 |
Date: |
Tue, 9 May 2023 00:31:18 +0300 |
---
storeio/io.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/storeio/io.c b/storeio/io.c
index 3c4cb9ff..f01e1918 100644
--- a/storeio/io.c
+++ b/storeio/io.c
@@ -86,13 +86,20 @@ trivfs_S_io_read (struct trivfs_protid *cred,
data_t *data, mach_msg_type_name_t *data_len,
off_t offs, vm_size_t amount)
{
+ error_t err;
+ size_t data_size = *data_len;
+
if (! cred)
return EOPNOTSUPP;
else if (! (cred->po->openmodes & O_READ))
return EBADF;
- else
- return open_read ((struct open *)cred->po->hook,
- offs, amount, (void **)data, data_len);
+
+ err = open_read ((struct open *)cred->po->hook,
+ offs, amount, (void **)data, &data_size);
+ if (err)
+ return err;
+ *data_len = data_size;
+ return 0;
}
/* Tell how much data can be read from the object without blocking for
--
2.40.1
- [PATCH 27/41] boot: Port to x64_64, (continued)
- [PATCH 27/41] boot: Port to x64_64, Sergey Bugaev, 2023/05/08
- [PATCH 37/41] console-client: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 30/41] startup: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 15/41] utils: Avoid warnings about prototype mismatch, Sergey Bugaev, 2023/05/08
- [PATCH 18/41] proc: Fix use-after-realloc, Sergey Bugaev, 2023/05/08
- [PATCH 31/41] mach-defpager: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 38/41] trans: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 19/41] exec: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 25/41] daemons: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 40/41] Disable Linux-based pfinet on x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 23/41] storeio: Port to x86_64,
Sergey Bugaev <=
- [PATCH 24/41] devnode: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 39/41] Look for mach_i386 in mach/machine/, Sergey Bugaev, 2023/05/08
- [PATCH 36/41] term: Port to x86_64, Sergey Bugaev, 2023/05/08
- [PATCH 28/41] eth-multiplexer: Port to x86_64, Sergey Bugaev, 2023/05/08
- Re: [PATCH 00/41] The x86_64 port, Samuel Thibault, 2023/05/09