From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54230 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OP9GE-00010R-E0 for qemu-devel@nongnu.org; Thu, 17 Jun 2010 03:11:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OP9GD-0002n7-9s for qemu-devel@nongnu.org; Thu, 17 Jun 2010 03:11:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44865) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OP9GD-0002mn-2Q for qemu-devel@nongnu.org; Thu, 17 Jun 2010 03:11:37 -0400 Message-ID: <4C19CAA2.8040203@redhat.com> Date: Thu, 17 Jun 2010 09:11:30 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <1276517071-17746-1-git-send-email-Jes.Sorensen@redhat.com> <20100617024201.GA4694@morn.localdomain> In-Reply-To: <20100617024201.GA4694@morn.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] SeaBIOS: Fix bvprintf() to respect padding for hex printing. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org On 06/17/10 04:42, Kevin O'Connor wrote: > On Mon, Jun 14, 2010 at 02:04:31PM +0200, Jes.Sorensen@redhat.com wrote: >> From: Jes Sorensen >> >> 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 Thanks for catching this. Cheers, Jes