1 #include "defs.h"
2
SYS_FUNC(utime)3 SYS_FUNC(utime)
4 {
5 union {
6 long utl[2];
7 int uti[2];
8 long paranoia_for_huge_wordsize[4];
9 } u;
10 unsigned wordsize;
11
12 if (entering(tcp)) {
13 printpath(tcp, tcp->u_arg[0]);
14 tprints(", ");
15
16 wordsize = current_wordsize;
17 if (!tcp->u_arg[1])
18 tprints("NULL");
19 else if (!verbose(tcp))
20 tprintf("%#lx", tcp->u_arg[1]);
21 else if (umoven(tcp, tcp->u_arg[1], 2 * wordsize, &u) < 0)
22 tprints("[?, ?]");
23 else if (wordsize == sizeof u.utl[0]) {
24 tprintf("[%s,", sprinttime(u.utl[0]));
25 tprintf(" %s]", sprinttime(u.utl[1]));
26 }
27 else if (wordsize == sizeof u.uti[0]) {
28 tprintf("[%s,", sprinttime(u.uti[0]));
29 tprintf(" %s]", sprinttime(u.uti[1]));
30 }
31 else
32 tprintf("<decode error: unsupported wordsize %d>",
33 wordsize);
34 }
35 return 0;
36 }
37