From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yoann P." Subject: Re: [PATCH] Fix ss Netid column and Local/Peer_Address Date: Mon, 29 Oct 2018 21:07:47 +0100 Message-ID: <1657380.VKiAY23QHg@yo-gs> References: <5185850.l7bAsbzJZX@yo-gs> <20181029192036.567fc122@redhat.com> <20181029194938.7df26333@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: Stefano Brivio Return-path: Received: from mail-wm1-f66.google.com ([209.85.128.66]:40507 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbeJ3E6C (ORCPT ); Tue, 30 Oct 2018 00:58:02 -0400 Received: by mail-wm1-f66.google.com with SMTP id b203-v6so9235757wme.5 for ; Mon, 29 Oct 2018 13:07:49 -0700 (PDT) In-Reply-To: <20181029194938.7df26333@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; I can't reproduce the issue with this modification. :).