[PATCH v2] display_options: print_size: Fix order overflow
Tom Rini
trini at konsulko.com
Sat Sep 24 00:48:44 CEST 2022
On Mon, Sep 12, 2022 at 09:02:27PM +0200, Pali Rohár wrote:
> Function print_size() round size to the nearst value with one decimal
> fraction number. But in special cases also unit order may overflow.
>
> For example value 1073689396 is printed as "1024 MiB" and value 1073741824
> as "1 GiB".
>
> Fix this issue by detecting order overflow and increasing unit order.
> With this change also value 1073689396 is printed as "1 GiB".
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220923/620c29d8/attachment.sig>
More information about the U-Boot
mailing list