u-boot/test/lib
Pali Rohár d179018e4c display_options: print_size: Fix order overflow
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@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-23 15:13:18 -04:00
..
abuf.c
asn1.c
cmd_ut_lib.c
efi_device_path.c
efi_image_region.c
getopt.c
hexdump.c
Kconfig test: Add some tests for kconfig.h 2022-08-10 13:38:30 -04:00
kconfig_spl.c test: Add some tests for kconfig.h 2022-08-10 13:38:30 -04:00
kconfig.c test: Add some tests for kconfig.h 2022-08-10 13:38:30 -04:00
lmb.c
longjmp.c
Makefile test: Add some tests for kconfig.h 2022-08-10 13:38:30 -04:00
rsa.c
sscanf.c
string.c
strlcat.c
test_aes.c
test_crypt.c
test_errno_str.c
test_print.c display_options: print_size: Fix order overflow 2022-09-23 15:13:18 -04:00