mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 13:41:31 +00:00
disk: Fixed capacity message
With capacities getting bigger, we can see see messages with negative numbers like "Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)". Here the printed LBA is -387938128 when it should have been 3907029168. To fix this, use the right format when displaying the unsigned integers. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reported-by: Yan Liu <yan-liu@ti.com>
This commit is contained in:
parent
c7c47ca246
commit
139f7b1ded
1 changed files with 2 additions and 2 deletions
|
@ -190,13 +190,13 @@ void dev_print (struct blk_desc *dev_desc)
|
||||||
printf (" Supports 48-bit addressing\n");
|
printf (" Supports 48-bit addressing\n");
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_SYS_64BIT_LBA)
|
#if defined(CONFIG_SYS_64BIT_LBA)
|
||||||
printf (" Capacity: %ld.%ld MB = %ld.%ld GB (%Ld x %ld)\n",
|
printf (" Capacity: %lu.%lu MB = %lu.%lu GB (%llu x %lu)\n",
|
||||||
mb_quot, mb_rem,
|
mb_quot, mb_rem,
|
||||||
gb_quot, gb_rem,
|
gb_quot, gb_rem,
|
||||||
lba,
|
lba,
|
||||||
dev_desc->blksz);
|
dev_desc->blksz);
|
||||||
#else
|
#else
|
||||||
printf (" Capacity: %ld.%ld MB = %ld.%ld GB (%ld x %ld)\n",
|
printf (" Capacity: %lu.%lu MB = %lu.%lu GB (%lu x %lu)\n",
|
||||||
mb_quot, mb_rem,
|
mb_quot, mb_rem,
|
||||||
gb_quot, gb_rem,
|
gb_quot, gb_rem,
|
||||||
(ulong)lba,
|
(ulong)lba,
|
||||||
|
|
Loading…
Add table
Reference in a new issue