diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2014-02-05 16:17:02 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2014-02-05 16:17:02 +0000 |
commit | f67502e4045393fb46d73e876128dfd539a63b04 (patch) | |
tree | 330a087bdf6e04ae371979a08ee8de9709440ddd /bjm.c | |
parent | 2f332e937a549f7073a74ebeb66d0a4fe70040c9 (diff) | |
download | strace-f67502e4045393fb46d73e876128dfd539a63b04.tar.gz strace-f67502e4045393fb46d73e876128dfd539a63b04.tar.bz2 strace-f67502e4045393fb46d73e876128dfd539a63b04.tar.xz |
Implement finit_module decoding
* bjm.c (module_init_flags): New xlat structure.
(sys_finit_module): New function.
* linux/dummy.h (sys_finit_module): Remove.
* linux/syscall.h (sys_finit_module): New prototype.
Diffstat (limited to 'bjm.c')
-rw-r--r-- | bjm.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -200,3 +200,30 @@ sys_init_module(struct tcb *tcp) } return 0; } + +#define MODULE_INIT_IGNORE_MODVERSIONS 1 +#define MODULE_INIT_IGNORE_VERMAGIC 2 + +static const struct xlat module_init_flags[] = { + XLAT(MODULE_INIT_IGNORE_MODVERSIONS), + XLAT(MODULE_INIT_IGNORE_VERMAGIC), + XLAT_END +}; + +int +sys_finit_module(struct tcb *tcp) +{ + if (exiting(tcp)) + return 0; + + /* file descriptor */ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + /* param_values */ + printstr(tcp, tcp->u_arg[1], -1); + tprints(", "); + /* flags */ + printflags(module_init_flags, tcp->u_arg[2], "MODULE_INIT_???"); + + return 0; +} |