blob: b21c799c78bbe639b3de958ef76849f0a3690944 [file] [log] [blame]
Dmitry V. Levinfb470f32014-12-06 03:53:16 +00001#include "defs.h"
2
Dmitry V. Levina0bd3742015-04-07 01:36:50 +00003SYS_FUNC(utime)
Dmitry V. Levinfb470f32014-12-06 03:53:16 +00004{
5 union {
6 long utl[2];
7 int uti[2];
8 long paranoia_for_huge_wordsize[4];
9 } u;
10 unsigned wordsize;
11
Dmitry V. Levin8d51f432015-07-15 08:29:56 +000012 printpath(tcp, tcp->u_arg[0]);
13 tprints(", ");
Dmitry V. Levinfb470f32014-12-06 03:53:16 +000014
Dmitry V. Levin8d51f432015-07-15 08:29:56 +000015 wordsize = current_wordsize;
16 if (umoven_or_printaddr(tcp, tcp->u_arg[1], 2 * wordsize, &u))
17 ;
18 else if (wordsize == sizeof u.utl[0]) {
19 tprintf("[%s,", sprinttime(u.utl[0]));
20 tprintf(" %s]", sprinttime(u.utl[1]));
Dmitry V. Levinfb470f32014-12-06 03:53:16 +000021 }
Dmitry V. Levin8d51f432015-07-15 08:29:56 +000022 else if (wordsize == sizeof u.uti[0]) {
23 tprintf("[%s,", sprinttime(u.uti[0]));
24 tprintf(" %s]", sprinttime(u.uti[1]));
25 }
26 else
27 tprintf("<decode error: unsupported wordsize %d>",
28 wordsize);
29
30 return RVAL_DECODED;
Dmitry V. Levinfb470f32014-12-06 03:53:16 +000031}