]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ss: prevent "Process" column from being printed unless requested
authorQuentin Deslandes <qde@naccy.de>
Wed, 6 Dec 2023 11:14:44 +0000 (12:14 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 6 Dec 2023 17:41:09 +0000 (09:41 -0800)
commit1607bf531fd2f984438d227ea97312df80e7cf56
tree87f943417df19edaadf1cb8653ce6623f60d50d1
parent4913a5c2068cd51ae17307d4f201a1d94d216bd5
ss: prevent "Process" column from being printed unless requested

Commit 5883c6eba517 ("ss: show header for --processes/-p") added
"Process" to the list of columns printed by ss. However, the "Process"
header is now printed even if --processes/-p is not used.

This change aims to fix this by moving the COL_PROC column ID to the same
index as the corresponding column structure in the columns array, and
enabling it if --processes/-p is used.

Fixes: 5883c6eba517 ("ss: show header for --processes/-p")
Signed-off-by: Quentin Deslandes <qde@naccy.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ss.c