-static void
-print_off_t(struct tcb *tcp, long addr)
-{
- unsigned long offset;
-
- if (!addr) {
- tprints("NULL");
- return;
- }
-
-#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
- if (current_wordsize == 4) {
- uint32_t off;
-
- if (umove(tcp, addr, &off) < 0)
- tprintf("%#lx", addr);
- else
- tprintf("[%u]", off);
- } else
-#endif
- if (umove(tcp, addr, &offset) < 0)
- tprintf("%#lx", addr);
- else
- tprintf("[%lu]", offset);
-}
-
-int
-sys_sendfile(struct tcb *tcp)
-{
- if (entering(tcp)) {
- printfd(tcp, tcp->u_arg[0]);
- tprints(", ");
- printfd(tcp, tcp->u_arg[1]);
- tprints(", ");
- print_off_t(tcp, tcp->u_arg[2]);
- tprintf(", %lu", tcp->u_arg[3]);
- }
- return 0;
-}
-
-void
-print_loff_t(struct tcb *tcp, long addr)
-{
- loff_t offset;
-
- if (!addr)
- tprints("NULL");
- else if (umove(tcp, addr, &offset) < 0)
- tprintf("%#lx", addr);
- else
- tprintf("[%llu]", (unsigned long long int) offset);
-}
-
-int
-sys_sendfile64(struct tcb *tcp)
-{
- if (entering(tcp)) {
- printfd(tcp, tcp->u_arg[0]);
- tprints(", ");
- printfd(tcp, tcp->u_arg[1]);
- tprints(", ");
- print_loff_t(tcp, tcp->u_arg[2]);
- tprintf(", %lu", tcp->u_arg[3]);
- }
- return 0;