Date: Fri, 28 Nov 2008 18:35:15 +0000 (UTC) From: "George V. Neville-Neil" <gnn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185400 - head/usr.bin/netstat Message-ID: <200811281835.mASIZFQC026460@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gnn Date: Fri Nov 28 18:35:14 2008 New Revision: 185400 URL: http://svn.freebsd.org/changeset/base/185400 Log: Fix a printing problem when using the -L flag to netstat caused by adding the -x flag earlier. Submitted by: Anton Yuzhaninov MFC after: 3 days Modified: head/usr.bin/netstat/inet.c Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Fri Nov 28 17:17:54 2008 (r185399) +++ head/usr.bin/netstat/inet.c Fri Nov 28 18:35:14 2008 (r185400) @@ -407,19 +407,22 @@ protopr(u_long off, const char *name, in if (Lflag) printf("%-5.5s %-14.14s %-22.22s\n", "Proto", "Listen", "Local Address"); - printf((Aflag && !Wflag) ? - "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s" : - "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", - "Proto", "Recv-Q", "Send-Q", - "Local Address", "Foreign Address"); - if (xflag) - printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %s\n", - "R-MBUF", "S-MBUF", "R-CLUS", "S-CLUS", - "R-HIWA", "S-HIWA", "R-LOWA", "S-LOWA", - "R-BCNT", "S-BCNT", "R-BMAX", "S-BMAX", - "(state)"); - else - printf("(state)\n"); + else { + printf((Aflag && !Wflag) ? + "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s" : + "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", + "Proto", "Recv-Q", "Send-Q", + "Local Address", "Foreign Address"); + if (xflag) + printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %s\n", + "R-MBUF", "S-MBUF", "R-CLUS", + "S-CLUS", "R-HIWA", "S-HIWA", + "R-LOWA", "S-LOWA", "R-BCNT", + "S-BCNT", "R-BMAX", "S-BMAX", + "(state)"); + else + printf("(state)\n"); + } first = 0; } if (Lflag && so->so_qlimit == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811281835.mASIZFQC026460>