]> granicus.if.org Git - strace/commitdiff
mq: Print msg_len parameter as kernel_ulong_t
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 27 Oct 2016 06:56:32 +0000 (09:56 +0300)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 28 Oct 2016 23:54:02 +0000 (02:54 +0300)
* mq.c (SYS_FUNC(mq_timedsend)): Change conversion specifier from "%lu"
to "%llu", use getarg_ull for obtaining msg_len parameter.
(SYS_FUNC(mq_timedreceive)): Likewise.

mq.c

diff --git a/mq.c b/mq.c
index cd4334a64ee5089f8ef055ed263081fec9d75aa1..357d87f15632c71c483f86e3b9a1edf3e012ff07 100644 (file)
--- a/mq.c
+++ b/mq.c
@@ -49,7 +49,7 @@ SYS_FUNC(mq_timedsend)
 {
        tprintf("%d, ", (int) tcp->u_arg[0]);
        printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-       tprintf(", %lu, %ld, ", tcp->u_arg[2], tcp->u_arg[3]);
+       tprintf(", %llu, %ld, ", getarg_ull(tcp, 2), tcp->u_arg[3]);
        print_timespec(tcp, tcp->u_arg[4]);
        return RVAL_DECODED;
 }
@@ -60,7 +60,7 @@ SYS_FUNC(mq_timedreceive)
                tprintf("%d, ", (int) tcp->u_arg[0]);
        } else {
                printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-               tprintf(", %lu, %ld, ", tcp->u_arg[2], tcp->u_arg[3]);
+               tprintf(", %llu, %ld, ", getarg_ull(tcp, 2), tcp->u_arg[3]);
                /*
                 * Since the timeout parameter is read by the kernel
                 * on entering syscall, it has to be decoded the same way