[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [UNIKRAFT PATCH 02/10] lib/vfscore: Register `faccessat` to syscall_shim
Looks ok. Reviewed-by: Daniel Dinca <dincadaniel97@xxxxxxxxx> On 28.04.2020 15:07, Constantin Raducanu wrote: Registers `faccessat` system call to syscall_shim library. Signed-off-by: Constantin Raducanu <raducanu.costi@xxxxxxxxx> --- lib/vfscore/Makefile.uk | 1 + lib/vfscore/exportsyms.uk | 2 ++ lib/vfscore/main.c | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk index 5d50b5d..da45140 100644 --- a/lib/vfscore/Makefile.uk +++ b/lib/vfscore/Makefile.uk @@ -35,3 +35,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += link-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += ftruncate-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += truncate-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += access-2 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += faccessat-4 diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk index 9c1803a..41c8f3c 100644 --- a/lib/vfscore/exportsyms.uk +++ b/lib/vfscore/exportsyms.uk @@ -92,6 +92,8 @@ access uk_syscall_e_access uk_syscall_r_access faccessat +uk_syscall_e_faccessat +uk_syscall_r_faccessat readlink uk_syscall_e_readlink uk_syscall_r_readlink diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c index 759c41b..588c4eb 100644 --- a/lib/vfscore/main.c +++ b/lib/vfscore/main.c @@ -1619,7 +1619,7 @@ UK_SYSCALL_R_DEFINE(int, access, const char*, pathname, int, mode) return -error; }-int faccessat(int dirfd, const char *pathname, int mode, int flags)+UK_SYSCALL_R_DEFINE(int, faccessat, int, dirfd, const char*, pathname, int, mode, int, flags) { if (flags & AT_SYMLINK_NOFOLLOW) { UK_CRASH("UNIMPLEMENTED: faccessat() with AT_SYMLINK_NOFOLLOW"); @@ -1632,8 +1632,7 @@ int faccessat(int dirfd, const char *pathname, int mode, int flags) struct vfscore_file *fp; int error = fget(dirfd, &fp); if (error) { - errno = error; - return -1; + goto out_error; }struct vnode *vp = fp->f_dentry->d_vnode;@@ -1652,6 +1651,7 @@ int faccessat(int dirfd, const char *pathname, int mode, int flags) vn_unlock(vp); fdrop(fp);+ out_error:return error; }
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |