]> granicus.if.org Git - strace/commitdiff
Use printnum_int64 instead of print_loff_t
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Jul 2015 11:14:12 +0000 (11:14 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Jul 2015 22:03:06 +0000 (22:03 +0000)
* defs.h (print_loff_t): Remove.
* io.c (print_loff_t): Remove.
(sys_sendfile64, sys_splice): Use printnum_int64 instead of print_loff_t.
* mtd.c (mtd_ioctl): Likewise.

defs.h
io.c
mtd.c

diff --git a/defs.h b/defs.h
index 9302cb7a7100e810d83831df21f6938963e4f649..74c8d608c82e7192566c44abe53181907faa3ac3 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -583,7 +583,6 @@ extern void tprint_iov(struct tcb *, unsigned long, unsigned long, int decode_io
 extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, int decode_iov, unsigned long);
 extern void tprint_open_modes(int);
 extern const char *sprint_open_modes(int);
-extern void print_loff_t(struct tcb *, long);
 extern void print_seccomp_filter(struct tcb *tcp, unsigned long);
 
 extern int block_ioctl(struct tcb *, const unsigned int, long);
diff --git a/io.c b/io.c
index 16ce229f11e1bf04d2d8469a06d8402056a01b68..b5e69d5c2178bac174a3e367ee4d4448b7667f34 100644 (file)
--- a/io.c
+++ b/io.c
@@ -270,15 +270,6 @@ SYS_FUNC(sendfile)
        return 0;
 }
 
-void
-print_loff_t(struct tcb *tcp, long addr)
-{
-       loff_t offset;
-
-       if (!umove_or_printaddr(tcp, addr, &offset))
-               tprintf("[%llu]", (unsigned long long int) offset);
-}
-
 SYS_FUNC(sendfile64)
 {
        if (entering(tcp)) {
@@ -286,7 +277,7 @@ SYS_FUNC(sendfile64)
                tprints(", ");
                printfd(tcp, tcp->u_arg[1]);
                tprints(", ");
-               print_loff_t(tcp, tcp->u_arg[2]);
+               printnum_int64(tcp, tcp->u_arg[2], "%" PRIu64);
                tprintf(", %lu", tcp->u_arg[3]);
        }
        return 0;
@@ -318,13 +309,13 @@ SYS_FUNC(splice)
                printfd(tcp, tcp->u_arg[0]);
                tprints(", ");
                /* loff_t *off_in */
-               print_loff_t(tcp, tcp->u_arg[1]);
+               printnum_int64(tcp, tcp->u_arg[1], "%" PRIu64);
                tprints(", ");
                /* int fd_out */
                printfd(tcp, tcp->u_arg[2]);
                tprints(", ");
                /* loff_t *off_out */
-               print_loff_t(tcp, tcp->u_arg[3]);
+               printnum_int64(tcp, tcp->u_arg[3], "%" PRIu64);
                tprints(", ");
                /* size_t len */
                tprintf("%lu, ", tcp->u_arg[4]);
diff --git a/mtd.c b/mtd.c
index 18f8af07a82c022a6038888c9bc038a7421b446c..5e8f6c22fb53eda2b7be528a5220d70f87b27e64 100644 (file)
--- a/mtd.c
+++ b/mtd.c
@@ -183,7 +183,7 @@ mtd_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
        case MEMGETBADBLOCK:
        case MEMSETBADBLOCK:
                tprints(", ");
-               print_loff_t(tcp, arg);
+               printnum_int64(tcp, arg, "%" PRIu64);
                break;
 
        case MEMGETINFO: {