|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v2 2/4] lib/vfscore: Register `read`, `readv` to syscall_shim
Registers `read` and `readv` system calls to syscall_shim library.
Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
lib/vfscore/Makefile.uk | 1 +
lib/vfscore/exportsyms.uk | 4 ++++
lib/vfscore/main.c | 5 +++--
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index 2022e949..44b2e6a8 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -26,3 +26,4 @@ LIBVFSCORE_SRCS-$(CONFIG_LIBVFSCORE_AUTOMOUNT_ROOTFS) += \
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += write-3 writev-3
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += read-3 readv-3
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index 34c7b8bc..52a07af2 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -19,6 +19,8 @@ uk_syscall_e_write
uk_syscall_r_write
close
read
+uk_syscall_e_read
+uk_syscall_r_read
mkdir
fsync
fstat
@@ -58,6 +60,8 @@ pread
pwrite
pwritev
readv
+uk_syscall_e_readv
+uk_syscall_r_readv
writev
truncate
mknod
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index ab480820..587aa56c 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -338,7 +338,7 @@ ssize_t pread(int fd, void *buf, size_t count, off_t offset)
LFS64(pread);
-ssize_t read(int fd, void *buf, size_t count)
+UK_SYSCALL_DEFINE(ssize_t, read, int, fd, void *, buf, size_t, count)
{
return pread(fd, buf, count, -1);
}
@@ -408,7 +408,8 @@ ssize_t preadv(int fd, const struct iovec *iov, int iovcnt,
off_t offset)
LFS64(preadv);
-ssize_t readv(int fd, const struct iovec *iov, int iovcnt)
+UK_SYSCALL_DEFINE(ssize_t, readv,
+ int, fd, const struct iovec *, iov, int, iovcnt)
{
return preadv(fd, iov, iovcnt, -1);
}
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |