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/uid.c b/uid.c
index 96b3d38..02cd699 100644
--- a/uid.c
+++ b/uid.c
@@ -37,16 +37,14 @@
# define uid_t_(size) uid_t__(size)
# define uid_t__(size) uint ## size ## _t
-int
-sys_getuid(struct tcb *tcp)
+SYS_FUNC(getuid)
{
if (exiting(tcp))
tcp->u_rval = (uid_t) tcp->u_rval;
return RVAL_UDECIMAL;
}
-int
-sys_setfsuid(struct tcb *tcp)
+SYS_FUNC(setfsuid)
{
if (entering(tcp))
tprintf("%u", (uid_t) tcp->u_arg[0]);
@@ -55,8 +53,7 @@
return RVAL_UDECIMAL;
}
-int
-sys_setuid(struct tcb *tcp)
+SYS_FUNC(setuid)
{
if (entering(tcp)) {
tprintf("%u", (uid_t) tcp->u_arg[0]);
@@ -75,8 +72,7 @@
tprintf("%s[%u]", prefix, uid);
}
-int
-sys_getresuid(struct tcb *tcp)
+SYS_FUNC(getresuid)
{
if (exiting(tcp)) {
if (syserror(tcp)) {
@@ -91,8 +87,7 @@
return 0;
}
-int
-sys_setreuid(struct tcb *tcp)
+SYS_FUNC(setreuid)
{
if (entering(tcp)) {
printuid("", tcp->u_arg[0]);
@@ -101,8 +96,7 @@
return 0;
}
-int
-sys_setresuid(struct tcb *tcp)
+SYS_FUNC(setresuid)
{
if (entering(tcp)) {
printuid("", tcp->u_arg[0]);
@@ -112,8 +106,7 @@
return 0;
}
-int
-sys_chown(struct tcb *tcp)
+SYS_FUNC(chown)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
@@ -123,8 +116,7 @@
return 0;
}
-int
-sys_fchown(struct tcb *tcp)
+SYS_FUNC(fchown)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
@@ -143,8 +135,7 @@
tprintf("%s%u", text, uid);
}
-int
-sys_setgroups(struct tcb *tcp)
+SYS_FUNC(setgroups)
{
if (entering(tcp)) {
unsigned long len, size, start, cur, end, abbrev_end;
@@ -197,8 +188,7 @@
return 0;
}
-int
-sys_getgroups(struct tcb *tcp)
+SYS_FUNC(getgroups)
{
unsigned long len;