From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlhPL-000560-El for qemu-devel@nongnu.org; Mon, 02 Jul 2012 10:15:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlhPF-0006iT-0t for qemu-devel@nongnu.org; Mon, 02 Jul 2012 10:15:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlhPE-0006iC-PL for qemu-devel@nongnu.org; Mon, 02 Jul 2012 10:15:12 -0400 From: Markus Armbruster References: <1340984094-5451-1-git-send-email-armbru@redhat.com> <1340984094-5451-19-git-send-email-armbru@redhat.com> <20120702125515.GA16482@stefanha-thinkpad.localdomain> <4FF19D21.20005@suse.de> Date: Mon, 02 Jul 2012 16:15:08 +0200 In-Reply-To: <4FF19D21.20005@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22's?= message of "Mon, 02 Jul 2012 15:07:45 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 18/32] hd-geometry: Switch to uint32_t to match BlockConf List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: kwolf@redhat.com, pbonzini@redhat.com, aliguori@us.ibm.com, Stefan Hajnoczi , qemu-devel@nongnu.org Andreas F=C3=A4rber writes: > Am 02.07.2012 14:55, schrieb Stefan Hajnoczi: >> On Fri, Jun 29, 2012 at 05:34:40PM +0200, Markus Armbruster wrote: >>> Best to use the same type, to avoid unwanted truncation or sign >>> extension. >>> >>> BlockConf can't use plain int for cyls, heads and secs, because >>> integer properties require an exact width. >>> >>> Signed-off-by: Markus Armbruster >>> --- >>> blockdev.h | 2 +- >>> hw/hd-geometry.c | 4 ++-- >>> hw/ide/core.c | 2 +- >>> hw/scsi-disk.c | 2 +- >>> hw/virtio-blk.c | 2 +- >>> 5 files changed, 6 insertions(+), 6 deletions(-) >>=20 >> It would be nice to update the hd_geometry_lchs_guess() trace event that >> you added to use uint32_t + %u instead of int + %d. > > PRIu32? uint32_t: Good point, will do. Conversion specifier: trace-events routinely prints uint32_t with %d and %x, never with PRI*32. I'm happy to change from %d to %u, but reluctant to add the first use of PRIu32.