]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/uktime: Register times syscall in syscall shim
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sun, 14 Feb 2021 20:09:16 +0000 (22:09 +0200)
committerUnikraft <monkey@unikraft.io>
Fri, 30 Apr 2021 14:04:19 +0000 (14:04 +0000)
The times syscall is marked as not supported, i.e. returns -ENOTSUP.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #125

lib/uktime/Makefile.uk
lib/uktime/exportsyms.uk
lib/uktime/time.c

index d4d4f86509cdaf9c6eca39829b4bfc02e16de60f..630e4e886ae5f40cfdb4a2c5c008100312b1c4c5 100644 (file)
@@ -16,3 +16,4 @@ LIBUKTIME_SRCS-y += $(LIBUKTIME_BASE)/timer.c
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBUKTIME) += nanosleep-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBUKTIME) += clock_gettime-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBUKTIME) += gettimeofday-2
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBUKTIME) += times-1
index ed5ab82381f2f2b258e34a042f3a1eee7864c485..0e9fa736233c5e466c8d670712d3d6a86e06c5db 100644 (file)
@@ -13,6 +13,8 @@ setitimer
 sleep
 timegm
 times
+uk_syscall_e_times
+uk_syscall_r_times
 usleep
 utime
 timer_create
index c757da95104ed3a4eeb9c514c7dde58512fba089..8fa30ab60c8fb39e7ef1e5b7298842982f2a8257 100644 (file)
@@ -176,10 +176,9 @@ int clock_settime(clockid_t clk_id __unused, const struct timespec *tp __unused)
        return 0;
 }
 
-int times(struct tm *buf __unused)
+UK_SYSCALL_R_DEFINE(int, times, struct tm *, buf)
 {
-       errno = ENOTSUP;
-       return -1;
+       return -ENOTSUP;
 }
 
 int setitimer(int which __unused, const struct itimerval *new_value __unused,