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

[UNIKRAFT PATCH 5/5] lib/vfscore: Register `getcwd` to syscall_shim



Registers `getcwd` system call to syscall_shim library.

Signed-off-by: Constantin Raducanu <raducanu.costi@xxxxxxxxx>
---
 lib/vfscore/Makefile.uk   | 3 ++-
 lib/vfscore/exportsyms.uk | 2 ++
 lib/vfscore/main.c        | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index 69f612f..4e44400 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -62,4 +62,5 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mkdir-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += creat-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += symlink-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pipe-1
-UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pipe2-2
\ No newline at end of file
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pipe2-2
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += getcwd-2
\ No newline at end of file
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index af1b199..dd499f9 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -75,6 +75,8 @@ unlink
 uk_syscall_e_unlink
 uk_syscall_r_unlink
 getcwd
+uk_syscall_e_getcwd
+uk_syscall_r_getcwd
 chown
 chroot
 chdir
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index fa43e0e..742e05c 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -1351,7 +1351,7 @@ UK_TRACEPOINT(trace_vfs_getcwd, "%p %d", char*, size_t);
 UK_TRACEPOINT(trace_vfs_getcwd_ret, "\"%s\"", const char*);
 UK_TRACEPOINT(trace_vfs_getcwd_err, "%d", int);
 
-char *getcwd(char *path, size_t size)
+UK_SYSCALL_DEFINE(char*, getcwd, char*, path, size_t, size)
 {
        trace_vfs_getcwd(path, size);
        struct task *t = main_task;
-- 
2.17.1




 


Rackspace

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