git: sbin/hammer2/cmd_debug.c: Refactor unreadable cmd_show()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Thu Oct 10 00:55:35 PDT 2024


commit 167a410d9720e60c8a92f4c69bb9a87d37572402
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Wed Oct 9 23:45:09 2024 -0700

    sbin/hammer2/cmd_debug.c: Refactor unreadable cmd_show()
    
    0b7381572b131c74051832dc251604e7f77b5a54 added multi-volumes
    support to cmd_show() (entry point of freemap,show,volhdr directives)
    with minimum modification using goto, but the code has been not
    so readable since then. Rewrite this entry point function.
    
    The output is same except that "Volume %d header %d..."
    by default (= when not showing volhdr or bref for all volumes)
    appears before printing each volhdr or bref, rather than all
    at once in the beginning.

Summary of changes:
 sbin/hammer2/cmd_debug.c | 137 +++++++++++++++++++++++------------------------
 1 file changed, 66 insertions(+), 71 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/167a410d9720e60c8a92f4c69bb9a87d37572402


-- 
DragonFly BSD source repository


More information about the Commits mailing list