]> granicus.if.org Git - strace/commitdiff
Output iovec length in vmsplice and process_vm_readv decoders
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 10 Mar 2012 14:03:25 +0000 (14:03 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 10 Mar 2012 14:03:25 +0000 (14:03 +0000)
* io.c (sys_vmsplice): Output iovec length.
* process.c (sys_process_vm_readv): Likewise.

io.c
process.c

diff --git a/io.c b/io.c
index 8f2b45ab82fb05ea2eac00af475da55da304646e..9dd869a42f30e9d0d14332ec0fd820a5dc62ca2a 100644 (file)
--- a/io.c
+++ b/io.c
@@ -361,7 +361,7 @@ sys_vmsplice(struct tcb *tcp)
                tprints(", ");
                /* const struct iovec *iov, unsigned long nr_segs */
                tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
-               tprints(", ");
+               tprintf(", %lu, ", tcp->u_arg[2]);
                /* unsigned int flags */
                printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
        }
index a6705ec9cd5a08afcea694b25ced9f27f98aab03..39e6f781c904abb7042a2da28e57749a83ee5948 100644 (file)
--- a/process.c
+++ b/process.c
@@ -2754,22 +2754,23 @@ sys_process_vm_readv(struct tcb *tcp)
                /* arg 1: pid */
                tprintf("%ld, ", tcp->u_arg[0]);
        } else {
-               /* args 2,3: local iov,cnt */
+               /* arg 2: local iov */
                if (syserror(tcp)) {
-                       tprintf("%#lx, %lu",
-                                       tcp->u_arg[1], tcp->u_arg[2]);
+                       tprintf("%#lx", tcp->u_arg[1]);
                } else {
                        tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
                }
-               tprints(", ");
-               /* args 4,5: remote iov,cnt */
+               /* arg 3: local iovcnt */
+               tprintf(", %lu, ", tcp->u_arg[2]);
+               /* arg 4: remote iov */
                if (syserror(tcp)) {
-                       tprintf("%#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]);
+                       tprintf("%#lx", tcp->u_arg[3]);
                } else {
                        tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
                }
+               /* arg 5: remote iovcnt */
                /* arg 6: flags */
-               tprintf(", %lu", tcp->u_arg[5]);
+               tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
        }
        return 0;
 }