|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH 03/11] lib/vfscore: Register `utimes` to syscall_shim
Registers `utimes` 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, 12 insertions(+), 6 deletions(-)
diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index aea4470..c2064d9 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -44,4 +44,5 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fchdir-1
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += dup-1
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += dup3-3
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += dup2-2
-UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pwritev-4
\ No newline at end of file
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pwritev-4
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += utimes-2
\ No newline at end of file
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index b54a6a1..44ff969 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -161,6 +161,8 @@ futimesat
utimensat
futimens
utimes
+uk_syscall_e_utimes
+uk_syscall_r_utimes
lutimes
posix_fadvise
scandir
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index 3edcd49..51417b9 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -1931,21 +1931,24 @@ static int do_utimes(const char *pathname, const struct
timeval times[2], int fl
error = task_conv(t, pathname, 0, path);
if (error) {
- trace_vfs_utimes_err(error);
- return libc_error(error);
+ goto out_error;
}
error = sys_utimes(path, times, flags);
if (error) {
- trace_vfs_utimes_err(error);
- return libc_error(error);
+ goto out_error;
}
trace_vfs_utimes_ret();
return 0;
+
+ out_error:
+ trace_vfs_utimes_err(error);
+ return -error;
}
-int utimes(const char *pathname, const struct timeval times[2])
+UK_SYSCALL_R_DEFINE(int, utimes, const char*, pathname,
+ const struct timeval*, times)
{
return do_utimes(pathname, times, 0);
}
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |