]> granicus.if.org Git - strace/blob - times.c
tests: add ftruncate64.test and truncate64.test
[strace] / times.c
1 #include "defs.h"
2 #include DEF_MPERS_TYPE(tms_t)
3 #include <sys/times.h>
4 typedef struct tms tms_t;
5 #include MPERS_DEFS
6
7 SYS_FUNC(times)
8 {
9         tms_t tbuf;
10
11         if (entering(tcp))
12                 return 0;
13
14         if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
15                 tprintf("{tms_utime=%llu, tms_stime=%llu, ",
16                         (unsigned long long) tbuf.tms_utime,
17                         (unsigned long long) tbuf.tms_stime);
18                 tprintf("tms_cutime=%llu, tms_cstime=%llu}",
19                         (unsigned long long) tbuf.tms_cutime,
20                         (unsigned long long) tbuf.tms_cstime);
21         }
22
23         return syserror(tcp) ? RVAL_DECIMAL : RVAL_UDECIMAL;
24 }