]> granicus.if.org Git - strace/commitdiff
Cleanup socketpair decoding
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Mar 2014 22:50:39 +0000 (22:50 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Mar 2014 22:50:39 +0000 (22:50 +0000)
The only supported domain for socketpair syscall is AF_UNIX, so
no decoding related to other domains is required for socketpair.

* net.c (sys_socketpair): Remove support for PF_INET and PF_IPX domains,
print the protocol argument as is.

net.c

diff --git a/net.c b/net.c
index f09d1dd66a92edee24f66e2925aaf251e595523e..10b352892d056bf7584fe0e38d66414edeb89b86 100644 (file)
--- a/net.c
+++ b/net.c
@@ -2056,23 +2056,7 @@ sys_socketpair(struct tcb *tcp)
                printxval(domains, tcp->u_arg[0], "PF_???");
                tprints(", ");
                tprint_sock_type(tcp, tcp->u_arg[1]);
-               tprints(", ");
-               switch (tcp->u_arg[0]) {
-               case PF_INET:
-                       printxval(protocols, tcp->u_arg[2], "IPPROTO_???");
-                       break;
-#ifdef PF_IPX
-               case PF_IPX:
-                       /* BTW: I don't believe this.. */
-                       tprints("[");
-                       printxval(domains, tcp->u_arg[2], "PF_???");
-                       tprints("]");
-                       break;
-#endif /* PF_IPX */
-               default:
-                       tprintf("%lu", tcp->u_arg[2]);
-                       break;
-               }
+               tprintf(", %lu", tcp->u_arg[2]);
        } else {
                if (syserror(tcp)) {
                        tprintf(", %#lx", tcp->u_arg[3]);