From: Dmitry V. Levin Date: Sun, 2 Oct 2016 16:20:05 +0000 (+0000) Subject: Use tprints instead of tprintf in a few more places X-Git-Tag: v4.14~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cce5aaef1e44c59063e8b3e99dc3045305a52f20;p=strace Use tprints instead of tprintf in a few more places * btrfs.c (btrfs_print_qgroup_inherit, btrfs_print_tree_search, btrfs_ioctl): Replace tprintf with tprints for printing strings without format specifiers. * net.c (print_group_req): Likewise. * scsi.c (scsi_ioctl): Likewise. * term.c (decode_termios, decode_termio): Likewise. * userfaultfd.c (uffdio_ioctl): Likewise. --- diff --git a/btrfs.c b/btrfs.c index 6d02cb2c..1306ceff 100644 --- a/btrfs.c +++ b/btrfs.c @@ -383,7 +383,7 @@ btrfs_print_qgroup_inherit(struct tcb *tcp, const unsigned long qgi_addr) if (umove_or_printaddr(tcp, qgi_addr, &inherit)) return; - tprintf("{flags="); + tprints("{flags="); printflags64(btrfs_qgroup_inherit_flags, inherit.flags, "BTRFS_QGROUP_INHERIT_???"); tprintf(", num_qgroups=%" PRI__u64 ", num_ref_copies=%" PRI__u64 @@ -423,7 +423,7 @@ btrfs_print_tree_search(struct tcb *tcp, struct btrfs_ioctl_search_key *key, uint64_t buf_addr, uint64_t buf_size, bool print_size) { if (entering(tcp)) { - tprintf("{key={tree_id="); + tprints("{key={tree_id="); btrfs_print_objectid(key->tree_id); if (key->min_objectid != BTRFS_FIRST_FREE_OBJECTID || @@ -1322,7 +1322,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, btrfs_print_qgroup_inherit(tcp, (unsigned long) args.qgroup_inherit); } - tprintf(", name="); + tprints(", name="); print_quoted_string(args.name, sizeof(args.name), QUOTE_0_TERMINATED); tprints("}"); diff --git a/net.c b/net.c index 017764cc..b0394630 100644 --- a/net.c +++ b/net.c @@ -702,7 +702,7 @@ print_group_req(struct tcb *tcp, long addr, int len) tprintf("{gr_interface=%u, gr_group=", greq.gr_interface); print_sockaddr(tcp, &greq.gr_group, sizeof(greq.gr_group)); - tprintf("}"); + tprints("}"); } #endif /* MCAST_JOIN_GROUP */ diff --git a/scsi.c b/scsi.c index dc51dd57..979c3428 100644 --- a/scsi.c +++ b/scsi.c @@ -275,7 +275,7 @@ scsi_ioctl(struct tcb *tcp, const unsigned int code, const long arg) else print_sg_io_res(tcp, iid, arg); } - tprintf("}"); + tprints("}"); return RVAL_DECODED | 1; } } diff --git a/term.c b/term.c index 530ffc4c..2b0be68e 100644 --- a/term.c +++ b/term.c @@ -67,10 +67,10 @@ decode_termios(struct tcb *tcp, const long addr) if (!(tios.c_lflag & ICANON)) tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ", tios.c_cc[VMIN], tios.c_cc[VTIME]); - tprintf("c_cc=\""); + tprints("c_cc=\""); for (i = 0; i < NCCS; i++) tprintf("\\x%02x", tios.c_cc[i]); - tprintf("\"}"); + tprints("\"}"); } static void @@ -109,10 +109,10 @@ decode_termio(struct tcb *tcp, const long addr) tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ", tio.c_cc[VMIN], tio.c_cc[VTIME]); #endif /* !_VMIN */ - tprintf("c_cc=\""); + tprints("c_cc=\""); for (i = 0; i < NCC; i++) tprintf("\\x%02x", tio.c_cc[i]); - tprintf("\"}"); + tprints("\"}"); } static void diff --git a/userfaultfd.c b/userfaultfd.c index 27211051..07094a10 100644 --- a/userfaultfd.c +++ b/userfaultfd.c @@ -77,7 +77,7 @@ uffdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg) printflags64(uffd_api_flags, ua.ioctls, "_UFFDIO_???"); } - tprintf("}"); + tprints("}"); } return 1; } @@ -107,14 +107,14 @@ uffdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg) tprints(", "); if (umove_or_printaddr(tcp, arg, &ur)) return RVAL_DECODED | 1; - tprintf("{range="); + tprints("{range="); tprintf_uffdio_range(&ur.range); - tprintf(", mode="); + tprints(", mode="); printflags64(uffd_register_mode_flags, ur.mode, "UFFDIO_REGISTER_MODE_???"); } else { if (!syserror(tcp) && !umove(tcp, arg, &ur)) { - tprintf(", ioctls="); + tprints(", ioctls="); printflags64(uffd_register_ioctl_flags, ur.ioctls, "UFFDIO_???"); } @@ -138,9 +138,9 @@ uffdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg) tprints(", "); if (umove_or_printaddr(tcp, arg, &uz)) return RVAL_DECODED | 1; - tprintf("{range="); + tprints("{range="); tprintf_uffdio_range(&uz.range); - tprintf(", mode="); + tprints(", mode="); printflags64(uffd_zeropage_flags, uz.mode, "UFFDIO_ZEROPAGE_???"); } else {