[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH 4/8] lib/vfscore: Register `mkdir` to syscall_shim
Registers `mkdir` 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 | 13 ++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk index 1fe5eb6..8f04e45 100644 --- a/lib/vfscore/Makefile.uk +++ b/lib/vfscore/Makefile.uk @@ -57,4 +57,5 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += lstat-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += flock-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += unlink-1 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += stat-2 -UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += open-3 \ No newline at end of file +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += open-3 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mkdir-2 \ No newline at end of file diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk index 7e2f7ea..307dd5f 100644 --- a/lib/vfscore/exportsyms.uk +++ b/lib/vfscore/exportsyms.uk @@ -26,6 +26,8 @@ read uk_syscall_e_read uk_syscall_r_read mkdir +uk_syscall_e_mkdir +uk_syscall_r_mkdir fsync uk_syscall_e_fsync uk_syscall_r_fsync diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c index 1bbbbd4..e5b3a16 100644 --- a/lib/vfscore/main.c +++ b/lib/vfscore/main.c @@ -862,8 +862,7 @@ UK_TRACEPOINT(trace_vfs_mkdir, "\"%s\" 0%0o", const char*, mode_t); UK_TRACEPOINT(trace_vfs_mkdir_ret, ""); UK_TRACEPOINT(trace_vfs_mkdir_err, "%d", int); -int -mkdir(const char *pathname, mode_t mode) +UK_SYSCALL_R_DEFINE(int, mkdir, const char*, pathname, mode_t, mode) { struct task *t = main_task; char path[PATH_MAX]; @@ -873,17 +872,17 @@ mkdir(const char *pathname, mode_t mode) trace_vfs_mkdir(pathname, mode); if ((error = task_conv(t, pathname, VWRITE, path)) != 0) - goto out_errno; + goto out_error; error = sys_mkdir(path, mode); if (error) - goto out_errno; + goto out_error; trace_vfs_mkdir_ret(); return 0; - out_errno: + + out_error: trace_vfs_mkdir_err(error); - errno = error; - return -1; + return -error; } UK_TRACEPOINT(trace_vfs_rmdir, "\"%s\"", const char*); -- 2.17.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |