Date: Mon, 20 Apr 2026 01:11:25 +0800 From: Zhenlei Huang <zlei@FreeBSD.org> To: Mark Millard <marklmi@yahoo.com> Cc: "freebsd-stable@FreeBSD.org" <freebsd-stable@freebsd.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: 14.3-RELEASE gpart show output (?.?T) vs. 14.4 and 15.0 and main: why do 14.4 and 15.0 and main have some single significant digit (?T) size figures? Message-ID: <68D25BCF-6B36-426D-B593-8391D6A5D5B1@FreeBSD.org> In-Reply-To: <fe02b10d-8ab6-46dc-a27a-949eee37b490@yahoo.com>
index | next in thread | previous in thread | raw e-mail
> On Apr 19, 2026, at 11:03 PM, Mark Millard <marklmi@yahoo.com> wrote:
>
> 14.3-RELEASE (more useful):
>
> => 40 1875384928 da1 GPT (894G)
> => 40 2930277095 nda1 GPT (1.4T)
> => 34 2930277101 da0 GPT (1.4T)
> => 34 3907029101 nda0 GPT (1.8T)
> => 34 4000797293 nda3 GPT (1.9T)
>
>
> 14.4-RELEASE and 15.0-RELEASE and main (less useful):
>
> => 40 1875384928 da1 GPT (894G)
> => 40 2930277095 nda1 GPT (1T)
> => 34 2930277101 da0 GPT (1T)
> => 34 3907029101 nda0 GPT (2T)
> => 34 4000797293 nda3 GPT (2T)
>
It appears to be caused by 4f809ffec69c (gpart: add libxo support for "show" subcommand + man page updates) .
Prior to the change the size was formatted to human friendly format by `fmtsize(pp->lg_mediasize))` which in turn calls
```
humanize_number(buf, sizeof(buf), rawsz, "", HN_AUTOSCALE,
HN_B | HN_NOSPACE | HN_DECIMAL);
```,
now it is formatted with
```
xo_emit(" ({h:size/%jd})\n", (intmax_t)pp->lg_mediasize);
```
It appears that libxo does not handle well with numbers those exceed 10^12, ( 1 Terabyte in this case ).
>
> --
> ===
> Mark Millard
> marklmi at yahoo.com
>
>
Best regards,
Zhenlei
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68D25BCF-6B36-426D-B593-8391D6A5D5B1>
