[SeaBIOS] [PATCH] SeaBIOS: Fix bvprintf() to respect padding for hex printing.

Jes Sorensen Jes.Sorensen at redhat.com
Thu Jun 17 09:11:30 CEST 2010


On 06/17/10 04:42, Kevin O'Connor wrote:
> On Mon, Jun 14, 2010 at 02:04:31PM +0200, Jes.Sorensen at redhat.com wrote:
>> From: Jes Sorensen <Jes.Sorensen at redhat.com>
>>
>> Fix bvprintf to respect space padding when printing hex numbers
>> and the caller specifies alignment without zero padding, eg. %2x
>> as opposed to %02x
> 
> I thought your patch would increase stack space in 16bit mode, but
> oddly it seems to actually reduce stack space (at least on gcc4.4.4).
> 
> So, the patch looks good, but I think you missed the case where the
> length given is smaller than the actual number, and %p needs to use
> zero padding.  How about the below instead.

Hi Kevin,

DOH, you're right! Your patch looks good to me so
Signed-off-by: Jes Sorensen <Jes.Sorensen at redhat.com>

Thanks for catching this.

Cheers,
Jes



More information about the SeaBIOS mailing list