From: Sergiu Moga Date: Tue, 16 Mar 2021 21:25:57 +0000 (+0200) Subject: lib/vfscore: Register `chroot` to syscall_shim X-Git-Tag: RELEASE-0.6~186 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2dbce922ea32ca6b58a578db97a8e0667e2d96bf;p=unikraft%2Funikraft.git lib/vfscore: Register `chroot` to syscall_shim Register `chroot` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Laurentiu Barbulescu Tested-by: Unikraft CI GitHub-Pull-Request: #158 --- diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk index c040a119d..ec8965f56 100644 --- a/lib/vfscore/Makefile.uk +++ b/lib/vfscore/Makefile.uk @@ -71,3 +71,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += umount2-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pipe2-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += symlink-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += unlink-1 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += chroot-1 diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk index 2a27409b6..758e50135 100644 --- a/lib/vfscore/exportsyms.uk +++ b/lib/vfscore/exportsyms.uk @@ -83,6 +83,8 @@ chown uk_syscall_e_chown uk_syscall_r_chown chroot +uk_syscall_e_chroot +uk_syscall_r_chroot chdir uk_syscall_e_chdir uk_syscall_r_chdir diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c index f37981389..9386b8025 100644 --- a/lib/vfscore/main.c +++ b/lib/vfscore/main.c @@ -2354,11 +2354,10 @@ fs_noop(void) return 0; } -int chroot(const char *path __unused) +UK_SYSCALL_R_DEFINE(int, chroot, const char*, path) { UK_WARN_STUBBED(); - errno = ENOSYS; - return -1; + return -ENOSYS; } static struct task _main_task_impl;