Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.
* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
diff --git a/time.c b/time.c
index 6db3563..b30fd0f 100644
--- a/time.c
+++ b/time.c
@@ -158,8 +158,7 @@
}
}
-int
-sys_time(struct tcb *tcp)
+SYS_FUNC(time)
{
if (exiting(tcp)) {
printnum_long(tcp, tcp->u_arg[0], "%ld");
@@ -167,8 +166,7 @@
return 0;
}
-int
-sys_gettimeofday(struct tcb *tcp)
+SYS_FUNC(gettimeofday)
{
if (exiting(tcp)) {
if (syserror(tcp)) {
@@ -183,8 +181,7 @@
}
#ifdef ALPHA
-int
-sys_osf_gettimeofday(struct tcb *tcp)
+SYS_FUNC(osf_gettimeofday)
{
if (exiting(tcp)) {
if (syserror(tcp)) {
@@ -199,8 +196,7 @@
}
#endif
-int
-sys_settimeofday(struct tcb *tcp)
+SYS_FUNC(settimeofday)
{
if (entering(tcp)) {
printtv(tcp, tcp->u_arg[0]);
@@ -211,8 +207,7 @@
}
#ifdef ALPHA
-int
-sys_osf_settimeofday(struct tcb *tcp)
+SYS_FUNC(osf_settimeofday)
{
if (entering(tcp)) {
printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0);
@@ -223,8 +218,7 @@
}
#endif
-int
-sys_adjtime(struct tcb *tcp)
+SYS_FUNC(adjtime)
{
if (entering(tcp)) {
printtv(tcp, tcp->u_arg[0]);
@@ -238,8 +232,7 @@
return 0;
}
-int
-sys_nanosleep(struct tcb *tcp)
+SYS_FUNC(nanosleep)
{
if (entering(tcp)) {
print_timespec(tcp, tcp->u_arg[0]);
@@ -314,8 +307,7 @@
#define printitv(tcp, addr) \
printitv_bitness((tcp), (addr), BITNESS_CURRENT)
-int
-sys_getitimer(struct tcb *tcp)
+SYS_FUNC(getitimer)
{
if (entering(tcp)) {
printxval(itimer_which, tcp->u_arg[0], "ITIMER_???");
@@ -330,8 +322,7 @@
}
#ifdef ALPHA
-int
-sys_osf_getitimer(struct tcb *tcp)
+SYS_FUNC(osf_getitimer)
{
if (entering(tcp)) {
printxval(itimer_which, tcp->u_arg[0], "ITIMER_???");
@@ -346,8 +337,7 @@
}
#endif
-int
-sys_setitimer(struct tcb *tcp)
+SYS_FUNC(setitimer)
{
if (entering(tcp)) {
printxval(itimer_which, tcp->u_arg[0], "ITIMER_???");
@@ -364,8 +354,7 @@
}
#ifdef ALPHA
-int
-sys_osf_setitimer(struct tcb *tcp)
+SYS_FUNC(osf_setitimer)
{
if (entering(tcp)) {
printxval(itimer_which, tcp->u_arg[0], "ITIMER_???");
@@ -496,8 +485,7 @@
return 0;
}
-int
-sys_adjtimex(struct tcb *tcp)
+SYS_FUNC(adjtimex)
{
if (exiting(tcp))
return do_adjtimex(tcp, tcp->u_arg[0]);
@@ -530,8 +518,7 @@
printxval(clocknames, clockid, "CLOCK_???");
}
-int
-sys_clock_settime(struct tcb *tcp)
+SYS_FUNC(clock_settime)
{
if (entering(tcp)) {
printclockname(tcp->u_arg[0]);
@@ -541,8 +528,7 @@
return 0;
}
-int
-sys_clock_gettime(struct tcb *tcp)
+SYS_FUNC(clock_gettime)
{
if (entering(tcp)) {
printclockname(tcp->u_arg[0]);
@@ -556,8 +542,7 @@
return 0;
}
-int
-sys_clock_nanosleep(struct tcb *tcp)
+SYS_FUNC(clock_nanosleep)
{
if (entering(tcp)) {
printclockname(tcp->u_arg[0]);
@@ -575,8 +560,7 @@
return 0;
}
-int
-sys_clock_adjtime(struct tcb *tcp)
+SYS_FUNC(clock_adjtime)
{
if (exiting(tcp))
return do_adjtimex(tcp, tcp->u_arg[1]);
@@ -672,8 +656,7 @@
}
}
-int
-sys_timer_create(struct tcb *tcp)
+SYS_FUNC(timer_create)
{
if (entering(tcp)) {
printclockname(tcp->u_arg[0]);
@@ -691,8 +674,7 @@
return 0;
}
-int
-sys_timer_settime(struct tcb *tcp)
+SYS_FUNC(timer_settime)
{
if (entering(tcp)) {
tprintf("%#lx, ", tcp->u_arg[0]);
@@ -709,8 +691,7 @@
return 0;
}
-int
-sys_timer_gettime(struct tcb *tcp)
+SYS_FUNC(timer_gettime)
{
if (entering(tcp)) {
tprintf("%#lx, ", tcp->u_arg[0]);
@@ -811,8 +792,7 @@
#include "xlat/timerfdflags.h"
-int
-sys_timerfd(struct tcb *tcp)
+SYS_FUNC(timerfd)
{
if (entering(tcp)) {
/* It does not matter that the kernel uses itimerspec. */
@@ -826,8 +806,7 @@
return 0;
}
-int
-sys_timerfd_create(struct tcb *tcp)
+SYS_FUNC(timerfd_create)
{
if (entering(tcp)) {
printclockname(tcp->u_arg[0]);
@@ -837,8 +816,7 @@
return 0;
}
-int
-sys_timerfd_settime(struct tcb *tcp)
+SYS_FUNC(timerfd_settime)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
@@ -852,8 +830,7 @@
return 0;
}
-int
-sys_timerfd_gettime(struct tcb *tcp)
+SYS_FUNC(timerfd_gettime)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);