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

Re: [UNIKRAFT PATCH 09/11] lib/vfscore: Register `umask` to syscall_shim



Looks good.

Reviewed-by: Daniel Dinca <dincadaniel97@xxxxxxxxx>

On 02.05.2020 21:18, Constantin Raducanu wrote:
Registers `umask` 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 5c64046..c7025bd 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -51,4 +51,5 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += rmdir-1
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += rename-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fsync-1
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fdatasync-1
-UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += preadv-4
\ No newline at end of file
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += preadv-4
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += umask-1
\ No newline at end of file
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index 46c7437..b9c29b1 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -132,6 +132,8 @@ uk_syscall_r_lseek
 uk_syscall_e_writev
 uk_syscall_r_writev
 umask
+uk_syscall_e_umask
+uk_syscall_r_umask
 dentry_alloc
 dentry_init
 dentry_lookup
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index e7b0e90..18cf17c 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -2138,7 +2138,7 @@ int posix_fadvise(int fd __unused, off_t offset __unused, off_t len __unused,
 }
 LFS64(posix_fadvise);
 
-mode_t umask(mode_t newmask)
+UK_SYSCALL_R_DEFINE(mode_t, umask, mode_t, newmask)
 {
 	return ukarch_exchange_n(&global_umask, newmask);
 }


 


Rackspace

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