git: gpt(8): Improve "show" command to print humanized size of partitions

Aaron LI aly at crater.dragonflybsd.org
Thu May 15 20:44:33 PDT 2025


commit aac9c1f2c2d0d0e75321d61d0245b2ff9b70602f
Author: Aaron LI <aly at aaronly.me>
Date:   Fri May 16 11:28:08 2025 +0800

    gpt(8): Improve "show" command to print humanized size of partitions
    
    Before:
    Disk da0: 50.0GB (104857600 512-byte sectors)
          start       size  index  contents
              0          1      -  PMBR
              1          1      -  Pri GPT header
              2         32      -  Pri GPT table
             34       2014      -  Unused
           2048     262144      0  GPT part - EFI System
         264192  104591360      1  GPT part - DragonFly Label64
      104855552       2015      -  Unused
      104857567         32      -  Sec GPT table
      104857599          1      -  Sec GPT header
    
    After:
    Disk da0: 50.0GB (104857600 512-byte sectors)
          Start    Sectors    Size  Index  Contents
              0          1    512B      -  PMBR
              1          1    512B      -  Pri GPT header
              2         32  16.0KB      -  Pri GPT table
             34       2014  1007KB      -  Unused
           2048     262144   128MB      0  GPT part - EFI System
         264192  104591360  49.9GB      1  GPT part - DragonFly Label64
      104855552       2015  1008KB      -  Unused
      104857567         32  16.0KB      -  Sec GPT table
      104857599          1    512B      -  Sec GPT header

Summary of changes:
 sbin/gpt/show.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/aac9c1f2c2d0d0e75321d61d0245b2ff9b70602f


-- 
DragonFly BSD source repository


More information about the Commits mailing list