diff options
author | Elvira Khabirova <lineprinter0@gmail.com> | 2015-08-20 21:15:41 +0300 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2015-08-28 08:46:23 +0000 |
commit | 1f53730965614f2e569d5985d698267362fb7e2f (patch) | |
tree | bb86b015243ed37d8f9f936df2c66e91a8c8df62 /mq.c | |
parent | cde9ef71838f5f9906d5ee846461973f0e68ee1b (diff) | |
download | strace-1f53730965614f2e569d5985d698267362fb7e2f.tar.gz |
Mpersify parsers of mq_open and mq_getsetattr syscalls
Fix multiple personalities support in parsers of mq_open and
mq_getsetattr by converting printmqattr into a mpersified printer.
* print_mq_attr.c (mq_attr_t): New typedef. Mpersify it.
(printmqattr): Use it instead of struct mq_attr. Wrap function name
into MPERS_PRINTER_DECL.
* mq.c (mq_open, mq_getsetattr): Use mpersified printmqattr.
Diffstat (limited to 'mq.c')
-rw-r--r-- | mq.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -29,8 +29,6 @@ #include "defs.h" #include <fcntl.h> -extern void printmqattr(struct tcb *tcp, const long addr); - SYS_FUNC(mq_open) { printpath(tcp, tcp->u_arg[0]); @@ -40,7 +38,7 @@ SYS_FUNC(mq_open) if (tcp->u_arg[1] & O_CREAT) { /* mode */ tprintf(", %#lo, ", tcp->u_arg[2]); - printmqattr(tcp, tcp->u_arg[3]); + MPERS_PRINTER_NAME(printmqattr)(tcp, tcp->u_arg[3]); } return RVAL_DECODED; } @@ -77,9 +75,9 @@ SYS_FUNC(mq_getsetattr) { if (entering(tcp)) { tprintf("%ld, ", tcp->u_arg[0]); - printmqattr(tcp, tcp->u_arg[1]); + MPERS_PRINTER_NAME(printmqattr)(tcp, tcp->u_arg[1]); tprints(", "); } else - printmqattr(tcp, tcp->u_arg[2]); + MPERS_PRINTER_NAME(printmqattr)(tcp, tcp->u_arg[2]); return 0; } |