Convert parser of struct itimerspec to new mpers infrastructure
* print_time.c (print_itimerspec): New mpers printer.
* time.c (sys_timer_settime, sys_timer_gettime, sys_timerfd,
sys_timerfd_settime, sys_timerfd_gettime): Use it instead of printitv.
diff --git a/time.c b/time.c
index ce355e9..c1f0671 100644
--- a/time.c
+++ b/time.c
@@ -430,10 +430,10 @@
tprintf("%d, ", (int) tcp->u_arg[0]);
printflags(clockflags, tcp->u_arg[1], "TIMER_???");
tprints(", ");
- printitv(tcp, tcp->u_arg[2]);
+ print_itimerspec(tcp, tcp->u_arg[2]);
tprints(", ");
} else {
- printitv(tcp, tcp->u_arg[3]);
+ print_itimerspec(tcp, tcp->u_arg[3]);
}
return 0;
}
@@ -443,7 +443,7 @@
if (entering(tcp)) {
tprintf("%d, ", (int) tcp->u_arg[0]);
} else {
- printitv(tcp, tcp->u_arg[1]);
+ print_itimerspec(tcp, tcp->u_arg[1]);
}
return 0;
}
@@ -452,13 +452,12 @@
SYS_FUNC(timerfd)
{
- /* It does not matter that the kernel uses itimerspec. */
tprintf("%ld, ", tcp->u_arg[0]);
printclockname(tcp->u_arg[0]);
tprints(", ");
printflags(timerfdflags, tcp->u_arg[2], "TFD_???");
tprints(", ");
- printitv(tcp, tcp->u_arg[3]);
+ print_itimerspec(tcp, tcp->u_arg[3]);
return RVAL_DECODED | RVAL_FD;
}
@@ -478,9 +477,9 @@
tprints(", ");
printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
tprints(", ");
- printitv(tcp, tcp->u_arg[2]);
+ print_itimerspec(tcp, tcp->u_arg[2]);
tprints(", ");
- printitv(tcp, tcp->u_arg[3]);
+ print_itimerspec(tcp, tcp->u_arg[3]);
return RVAL_DECODED;
}
@@ -491,7 +490,7 @@
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
} else {
- printitv(tcp, tcp->u_arg[1]);
+ print_itimerspec(tcp, tcp->u_arg[1]);
}
return 0;
}