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 <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2016-12-02 11:39:47 +01:00 committed by Stephen Hemminger
parent 6babc649a9
commit 4519999708
1 changed files with 2 additions and 2 deletions

View File

@ -3139,10 +3139,10 @@ static int unix_show_sock(const struct sockaddr_nl *addr, struct nlmsghdr *nlh,
unix_stats_print(&stat, f); unix_stats_print(&stat, f);
if (show_mem) { if (show_mem || show_details)
printf("\t"); printf("\t");
if (show_mem)
print_skmeminfo(tb, UNIX_DIAG_MEMINFO); print_skmeminfo(tb, UNIX_DIAG_MEMINFO);
}
if (show_details) { if (show_details) {
if (tb[UNIX_DIAG_SHUTDOWN]) { if (tb[UNIX_DIAG_SHUTDOWN]) {
unsigned char mask; unsigned char mask;