netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: "Yoann P." <yoann.p.public@gmail.com>
Cc: netdev@vger.kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH] Fix ss Netid column and Local/Peer_Address
Date: Mon, 29 Oct 2018 19:49:38 +0100	[thread overview]
Message-ID: <20181029194938.7df26333@redhat.com> (raw)
In-Reply-To: <20181029192036.567fc122@redhat.com>

On Mon, 29 Oct 2018 19:20:36 +0100
Stefano Brivio <sbrivio@redhat.com> 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

  reply	other threads:[~2018-10-30  3:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 20:53 [PATCH] Fix ss Netid column and Local/Peer_Address Yoann P.
2018-10-29 17:02 ` Stephen Hemminger
2018-10-29 18:20 ` Stefano Brivio
2018-10-29 18:49   ` Stefano Brivio [this message]
2018-10-29 20:07     ` Yoann P.
2018-10-29 22:03       ` Stefano Brivio
2018-10-29 20:06   ` Yoann P.
2018-10-29 22:03     ` Stefano Brivio
2018-10-29 22:20       ` Yoann P.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181029194938.7df26333@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=yoann.p.public@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).