diff options
author | Wichert Akkerman <wichert@deephackmode.org> | 1999-05-09 00:29:58 +0000 |
---|---|---|
committer | Wichert Akkerman <wichert@deephackmode.org> | 1999-05-09 00:29:58 +0000 |
commit | 2e2553a534f532a1546ea2b2f3dc3cd2276d020d (patch) | |
tree | 6cffd996287d564f4365dd0b13e1fd9abe33c186 /io.c | |
parent | 022c52fda19fa3e92a7000b239214fdd57248a4b (diff) | |
download | strace-2e2553a534f532a1546ea2b2f3dc3cd2276d020d.tar.gz strace-2e2553a534f532a1546ea2b2f3dc3cd2276d020d.tar.bz2 strace-2e2553a534f532a1546ea2b2f3dc3cd2276d020d.tar.xz |
Merged in a bunch of patches that I got as reaction to the 3.99 release.
See the ChangeLog for details
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 29 |
1 files changed, 25 insertions, 4 deletions
@@ -93,7 +93,7 @@ struct tcb *tcp; tprintf("{"); printstr(tcp, (long) iov[i].iov_base, iov[i].iov_len); - tprintf(", %u}", iov[i].iov_len); + tprintf(", %lu}", (unsigned long)iov[i].iov_len); } tprintf("]"); } @@ -129,7 +129,7 @@ struct tcb *tcp; tprintf("{"); printstr(tcp, (long) iov[i].iov_base, iov[i].iov_len); - tprintf(", %u}", iov[i].iov_len); + tprintf(", %lu}", (unsigned long)iov[i].iov_len); } tprintf("]"); } @@ -186,7 +186,8 @@ struct tcb *tcp; tprintf("%#lx", tcp->u_arg[1]); else printstr(tcp, tcp->u_arg[1], tcp->u_rval); - tprintf(", %lu, %lu", tcp->u_arg[2], tcp->u_arg[3]); + tprintf(", %lu, %llu", tcp->u_arg[2], + *(unsigned long long *)&tcp->u_arg[3]); } return 0; } @@ -198,7 +199,27 @@ struct tcb *tcp; if (entering(tcp)) { tprintf("%ld, ", tcp->u_arg[0]); printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, %lu", tcp->u_arg[2], tcp->u_arg[3]); + tprintf(", %lu, %llu", tcp->u_arg[2], + *(unsigned long long *)&tcp->u_arg[3]); + } + return 0; +} + +int +sys_sendfile(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + off_t offset; + + tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]); + if (!tcp->u_arg[2]) + tprintf("NULL"); + else if (umove(tcp, tcp->u_arg[2], &offset) < 0) + tprintf("%#lx", tcp->u_arg[2]); + else + tprintf("[%lu]", offset); + tprintf(", %lu", tcp->u_arg[3]); } return 0; } |