[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v2 4/4] lib/vfscore: Register `readlink` to syscall_shim



Registers `readlink` system call to syscall_shim library.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
Reviewed-by: Gaulthier Gain <gaulthier.gain@xxxxxxxxx>
---
 lib/vfscore/Makefile.uk   | 1 +
 lib/vfscore/exportsyms.uk | 2 ++
 lib/vfscore/main.c        | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index 69d65af9..a3391e68 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -28,3 +28,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
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fstat-2
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += readlink-3
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index 1317ca64..e863a544 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -83,6 +83,8 @@ fstatvfs
 access
 faccessat
 readlink
+uk_syscall_e_readlink
+uk_syscall_r_readlink
 fallocate
 lseek
 uk_syscall_e_writev
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index a6240634..b3fc2f24 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -1701,7 +1701,7 @@ int ftruncate(int fd, off_t length)
 
 LFS64(ftruncate);
 
-ssize_t readlink(const char *pathname, char *buf, size_t bufsize)
+UK_SYSCALL_DEFINE(ssize_t, readlink, const char *, pathname, char *, buf, 
size_t, bufsize)
 {
        struct task *t = main_task;
        char path[PATH_MAX];
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.