RE: [U-Boot-Users] IDE LBA48 support and vsprintf 64bit support

The hex hack can work in decimal too. Even more of a hack, but it will extend your range significantly.
if(sector < 1000000000) printf("Sector %d\n", sector); else printf("Sector %d%09d\n", (unsigned int)(sector / 1000000000), (unsigned int)(sector % 1000000000));
Testing is an exercize left to the reader ;-)
Except that this will increase the memory footprint, because of inclusion of 64bit math. (about the same amount or more than fixing vsprintf)
I am rewriting the patch so that 64bit usage can be CFG_ ed out or in...

In message DCEAAC0833DD314AB0B58112AD99B93B06DA7B@ismail.innsys.innovsys.com you wrote:
The hex hack can work in decimal too. Even more of a hack, but it will extend your range significantly.
if(sector < 1000000000) printf("Sector %d\n", sector); else printf("Sector %d%09d\n", (unsigned int)(sector / 1000000000), (unsigned int)(sector % 1000000000));
Testing is an exercize left to the reader ;-)
Except that this will increase the memory footprint, because of inclusion of 64bit math. (about the same amount or more than fixing vsprintf)
What do you think your "fix" to vsprintf will do?
Forget it. I will not add "long long" support to printf without a really good reason.
Best regards,
Wolfgang Denk
participants (2)
-
Rune Torgersen
-
Wolfgang Denk