From: Alan Cox Date: Sat, 23 May 2015 12:53:57 +0000 (+0100) Subject: syscall_proc: fix the CLOCK_MONOTONIC timer X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5711a053c77290f6557d6c771a63b02411b5dc97;p=FUZIX.git syscall_proc: fix the CLOCK_MONOTONIC timer --- diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index dfce06f7..8b8a64a7 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -141,16 +141,16 @@ arg_t _time(void) switch (type) { case 0: rdtime(&t); - uput(&t, tvec, sizeof(t)); - return (0); + break; case 1: - uput(&t.low, &ticks.full, sizeof(ticks)); - uzero(&t.high, sizeof(t.high)); - return 0; + t.low = ticks.full; + t.high = 0; + break; default: udata.u_error = EINVAL; return -1; } + return uput(&t, tvec, sizeof(t)); } #undef tvec