On 01/25, Gerd Hoffmann wrote:
Hi,
- drive->sectors = (u64)be32_to_cpu(capdata.sectors) + 1;
- dprintf(1, "%s blksize=%d sectors=%u\n"
, s, drive->blksize, (unsigned)drive->sectors);
- dprintf(1, "%s blksize=%d sectors=%llX\n", s, drive->blksize, drive->sectors);
Any specific reason why you change sectors from %u to %x?
I'd prefer to continue using %u.
drive->sectors is a unsigned 64 bit integer. The SeaBIOS implementation for the format specifier %u of dprintf() does not support 64 bit precision (%lu/%llu just silently truncates the integer).
I do have an internal patch that adds unsigned 64bit in support that I'd be happy to send, but it's quite a lot of code - it would require porting an implementation of __udivmoddi4, for prototyping I had pulled one from libgcc_s but I'm not sure if there is a licensing issue there. On balance I thought it would be easiest to just dump the number as hex.
When printing hex numbers they should be printed with '0x' prefix to make that clear.
Noted, will update in V3.
take care, Gerd