From a19b1fd0b361830ed185c9a9bb967e15036d8e67 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Mon, 15 Feb 2021 12:28:36 +0200 Subject: [PATCH] lib/vfscore: Register `umount2` to syscall_shim Register `umount2` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Cristian Vijelie Tested-by: Unikraft CI GitHub-Pull-Request: #127 --- lib/vfscore/Makefile.uk | 1 + lib/vfscore/exportsyms.uk | 2 ++ lib/vfscore/mount.c | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk index 0fcf43791..c662f0064 100644 --- a/lib/vfscore/Makefile.uk +++ b/lib/vfscore/Makefile.uk @@ -67,3 +67,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += lchown-3 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += chown-3 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += stat-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mkdir-2 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += umount2-2 diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk index 5fa15b0a3..f81f9d02c 100644 --- a/lib/vfscore/exportsyms.uk +++ b/lib/vfscore/exportsyms.uk @@ -68,6 +68,8 @@ uk_syscall_r_sync vfscore_mount_dump umount umount2 +uk_syscall_e_umount2 +uk_syscall_r_umount2 link uk_syscall_e_link uk_syscall_r_link diff --git a/lib/vfscore/mount.c b/lib/vfscore/mount.c index eefdf9e69..4bb83f8d6 100644 --- a/lib/vfscore/mount.c +++ b/lib/vfscore/mount.c @@ -256,8 +256,7 @@ vfscore_release_mp_dentries(struct mount *mp) drele(mp->m_root); } -int -umount2(const char *path, int flags) +UK_SYSCALL_R_DEFINE(int, umount2, const char*, path, int, flags) { struct mount *mp, *tmp; int error, pathlen; -- 2.39.5