From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio Subject: Re: [PATCH] Fix ss Netid column and Local/Peer_Address Date: Mon, 29 Oct 2018 19:49:38 +0100 Message-ID: <20181029194938.7df26333@redhat.com> References: <5185850.l7bAsbzJZX@yo-gs> <20181029192036.567fc122@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Stephen Hemminger To: "Yoann P." Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38386 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbeJ3Djl (ORCPT ); Mon, 29 Oct 2018 23:39:41 -0400 In-Reply-To: <20181029192036.567fc122@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 29 Oct 2018 19:20:36 +0100 Stefano Brivio wrote: > The actual issue seems to be that in some cases the left delimiter for > the State column is not printed Much worse, we always print the left delimiter of the last buffered column, which is usually empty. My bad. The issue is not so visible in general as we almost always have spaces to distribute around, but not if you start going below 70/75 columns. Can you try this? diff --git a/misc/ss.c b/misc/ss.c index f99b6874c228..90986b1dc15f 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -1260,7 +1260,7 @@ static void render(void) while (token) { /* Print left delimiter only if we already started a line */ if (line_started++) - printed = printf("%s", current_field->ldelim); + printed = printf("%s", f->ldelim); else printed = 0; -- Stefano