diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-09-01 10:00:28 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-09-01 10:00:28 +0200 |
commit | 60fe8c139c6f2febefe595781812ddf0864a6ab8 (patch) | |
tree | 97c410d11e4867d088466922bc8541166c38995b /sock.c | |
parent | 5940e6593911dcace424c668a1c0934c71fccb9e (diff) | |
download | strace-60fe8c139c6f2febefe595781812ddf0864a6ab8.tar.gz strace-60fe8c139c6f2febefe595781812ddf0864a6ab8.tar.bz2 strace-60fe8c139c6f2febefe595781812ddf0864a6ab8.tar.xz |
Use tprints with literal strings, it may be faster than tprintf
* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'sock.c')
-rw-r--r-- | sock.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -92,7 +92,7 @@ sock_ioctl(struct tcb *tcp, long code, long arg) && ifc.ifc_buf == NULL) tprintf(", {%d -> ", ifc.ifc_len); else - tprintf(", {"); + tprints(", {"); } return 0; } @@ -188,12 +188,12 @@ sock_ioctl(struct tcb *tcp, long code, long arg) printxval(addrfams, ifr.ifr_addr.sa_family, "AF_???"); - tprintf(", "); + tprints(", "); print_addr(tcp, ((long) tcp->u_arg[2] + offsetof(struct ifreq, ifr_addr.sa_data)), &ifr); - tprintf("}"); + tprints("}"); break; case SIOCGIFHWADDR: case SIOCSIFHWADDR: @@ -206,7 +206,7 @@ sock_ioctl(struct tcb *tcp, long code, long arg) break; case SIOCGIFFLAGS: case SIOCSIFFLAGS: - tprintf("ifr_flags="); + tprints("ifr_flags="); printflags(iffflags, ifr.ifr_flags, "IFF_???"); break; case SIOCGIFMETRIC: @@ -238,19 +238,19 @@ sock_ioctl(struct tcb *tcp, long code, long arg) (unsigned) ifr.ifr_map.port); break; } - tprintf("}"); + tprints("}"); } return 1; case SIOCGIFCONF: if (umove(tcp, tcp->u_arg[2], &ifc) < 0) { - tprintf("???}"); + tprints("???}"); return 1; } tprintf("%d, ", ifc.ifc_len); if (syserror(tcp)) { tprintf("%lx", (unsigned long) ifc.ifc_buf); } else if (ifc.ifc_buf == NULL) { - tprintf("NULL"); + tprints("NULL"); } else { int i; unsigned nifra = ifc.ifc_len / sizeof(struct ifreq); @@ -261,17 +261,17 @@ sock_ioctl(struct tcb *tcp, long code, long arg) tprintf("%lx}", (unsigned long) ifc.ifc_buf); return 1; } - tprintf("{"); + tprints("{"); for (i = 0; i < nifra; ++i ) { if (i > 0) - tprintf(", "); + tprints(", "); tprintf("{\"%s\", {", ifra[i].ifr_name); if (verbose(tcp)) { printxval(addrfams, ifra[i].ifr_addr.sa_family, "AF_???"); - tprintf(", "); + tprints(", "); print_addr(tcp, ((long) tcp->u_arg[2] + offsetof(struct ifreq, ifr_addr.sa_data) @@ -279,12 +279,12 @@ sock_ioctl(struct tcb *tcp, long code, long arg) - (char *) &ifra[0])), &ifra[i]); } else - tprintf("..."); - tprintf("}}"); + tprints("..."); + tprints("}}"); } - tprintf("}"); + tprints("}"); } - tprintf("}"); + tprints("}"); return 1; #endif default: |