From 033fb910a291a26d714d277c748683e67903f44c Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 11 Mar 2014 22:50:39 +0000 Subject: [PATCH] Cleanup socketpair decoding 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 | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/net.c b/net.c index f09d1dd6..10b35289 100644 --- 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]); -- 2.40.0