From: Phil Sutter Date: Fri, 2 Dec 2016 10:39:47 +0000 (+0100) Subject: ss: Add missing tab when printing UNIX details X-Git-Tag: v4.10.0~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=451999970816ae1042edbe05d4b34131669a4c83;p=thirdparty%2Fiproute2.git ss: Add missing tab when printing UNIX details When dumping UNIX sockets and show_details is active but not show_mem (ss -xne), the socket details are printed without being prefixed by tab. Fix this by printing the tab character when either one of '-e' or '-m' has been specified. Signed-off-by: Phil Sutter --- diff --git a/misc/ss.c b/misc/ss.c index 18ccb6dbf..bb46e49ff 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3139,10 +3139,10 @@ static int unix_show_sock(const struct sockaddr_nl *addr, struct nlmsghdr *nlh, unix_stats_print(&stat, f); - if (show_mem) { + if (show_mem || show_details) printf("\t"); + if (show_mem) print_skmeminfo(tb, UNIX_DIAG_MEMINFO); - } if (show_details) { if (tb[UNIX_DIAG_SHUTDOWN]) { unsigned char mask;