[U-Boot-Users] IDE LBA48 support and vsprintf 64bit support
VanBaren, Gerald (AGRE)
Gerald.VanBaren at smiths-aerospace.com
Fri Feb 27 20:04:01 CET 2004
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 ;-)
gvb
> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of Rune
> Torgersen
> Sent: Friday, February 27, 2004 1:36 PM
> To: u-boot-users at lists.sourceforge.net
> Subject: RE: [U-Boot-Users] IDE LBA48 support and vsprintf
> 64bit support
>
>
>
> > For disks, you can scale the value by 1e9 and then print in
> > decimal. I'm pretty sure this is what you would be doing
> anyway, no?
>
> Not really.
> Most places that needed it was printing out the sector number
> of the ide
> commands in decimal.
> And whenthe sector number exceeds 32bit, 64bit has to be used.
>
> I could change them to hex,which could print it without any
> problem, or
> leave it as 32bit, in which case it can handle 16 times larger disks
> than now (4 more bits (28->32)) (which is 2.1TB, not 548GB as i said
> before...)
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id56&alloc_id438&op=ick
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************
More information about the U-Boot
mailing list