diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2015-04-07 01:36:50 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2015-04-07 11:22:49 +0000 |
commit | a0bd3749fc6fdf6364c1e269a4c02e8c153eb84b (patch) | |
tree | d4a8cf7e8b95d626a6c916c4a325dfa23e89a52d /ldt.c | |
parent | cc59f14fb8eb951f41c8d823ba35c3b636092cd4 (diff) | |
download | strace-a0bd3749fc6fdf6364c1e269a4c02e8c153eb84b.tar.gz |
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.
Diffstat (limited to 'ldt.c')
-rw-r--r-- | ldt.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -39,8 +39,7 @@ print_user_desc(struct tcb *tcp, long addr) desc.useable); } -int -sys_modify_ldt(struct tcb *tcp) +SYS_FUNC(modify_ldt) { if (entering(tcp)) { tprintf("%ld, ", tcp->u_arg[0]); @@ -55,8 +54,7 @@ sys_modify_ldt(struct tcb *tcp) return 0; } -int -sys_set_thread_area(struct tcb *tcp) +SYS_FUNC(set_thread_area) { if (entering(tcp)) { print_user_desc(tcp, tcp->u_arg[0]); @@ -76,8 +74,7 @@ sys_set_thread_area(struct tcb *tcp) return 0; } -int -sys_get_thread_area(struct tcb *tcp) +SYS_FUNC(get_thread_area) { if (exiting(tcp)) { if (syserror(tcp)) @@ -91,8 +88,7 @@ sys_get_thread_area(struct tcb *tcp) #endif /* I386 || X86_64 || X32 */ #if defined(M68K) || defined(MIPS) -int -sys_set_thread_area(struct tcb *tcp) +SYS_FUNC(set_thread_area) { if (entering(tcp)) tprintf("%#lx", tcp->u_arg[0]); @@ -102,8 +98,7 @@ sys_set_thread_area(struct tcb *tcp) #endif #if defined(M68K) -int -sys_get_thread_area(struct tcb *tcp) +SYS_FUNC(get_thread_area) { return RVAL_HEX; } |