git: sockstat(1): Fix and improve output formatting

Aaron LI aly at crater.dragonflybsd.org
Thu Mar 7 06:59:58 PST 2024


commit 70bb9b563d99342f2f0a3c77d4451d0257dc06c5
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Mar 6 14:02:33 2024 +0800

    sockstat(1): Fix and improve output formatting
    
    The main issue with the old formatting was that the FD column was
    limited to 2 characters, so there would be no space between FD and PROTO
    columns.
    
    Increase the FD column to 5 characters, and increase the PID column to
    6 characters.  In addition, refactor the output formatting code to clean
    up the mess.
    
    While there, clean up the code a bit to save some type castings.

Summary of changes:
 usr.bin/sockstat/sockstat.c | 133 +++++++++++++++++++++++---------------------
 1 file changed, 69 insertions(+), 64 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/70bb9b563d99342f2f0a3c77d4451d0257dc06c5


-- 
DragonFly BSD source repository


More information about the Commits mailing list