Dmitry V. Levin | fb470f3 | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame^] | 3 | SYS_FUNC(utime) |
Dmitry V. Levin | fb470f3 | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 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]); |
Denys Vlasenko | 7e69ed9 | 2015-03-21 19:50:53 +0100 | [diff] [blame] | 21 | else if (umoven(tcp, tcp->u_arg[1], 2 * wordsize, &u) < 0) |
Dmitry V. Levin | fb470f3 | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 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 | } |