#include "defs.h"
+#include DEF_MPERS_TYPE(utimbuf_t)
+
+#include <utime.h>
+
+typedef struct utimbuf utimbuf_t;
+
+#include MPERS_DEFS
+
SYS_FUNC(utime)
{
- union {
- long utl[2];
- int uti[2];
- long paranoia_for_huge_wordsize[4];
- } u;
- unsigned wordsize;
-
- if (entering(tcp)) {
- printpath(tcp, tcp->u_arg[0]);
- tprints(", ");
+ utimbuf_t u;
- wordsize = current_wordsize;
- if (umoven_or_printaddr(tcp, tcp->u_arg[1], 2 * wordsize, &u))
- ;
- else if (wordsize == sizeof u.utl[0]) {
- tprintf("[%s,", sprinttime(u.utl[0]));
- tprintf(" %s]", sprinttime(u.utl[1]));
- }
- else if (wordsize == sizeof u.uti[0]) {
- tprintf("[%s,", sprinttime(u.uti[0]));
- tprintf(" %s]", sprinttime(u.uti[1]));
- }
- else
- tprintf("<decode error: unsupported wordsize %d>",
- wordsize);
+ printpath(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ if (!umove_or_printaddr(tcp, tcp->u_arg[1], &u)) {
+ tprintf("{actime=%lld", (long long) u.actime);
+ tprints_comment(sprinttime(u.actime));
+ tprintf(", modtime=%lld", (long long) u.modtime);
+ tprints_comment(sprinttime(u.modtime));
+ tprints("}");
}
- return 0;
+
+ return RVAL_DECODED;
}