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

Aaron LI aly at crater.dragonflybsd.org
Mon Mar 18 00:01:23 PDT 2024


commit c13724d564ab8be873d5c80058a750d95e3595bb
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/c13724d564ab8be873d5c80058a750d95e3595bb


-- 
DragonFly BSD source repository


More information about the Commits mailing list