From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MTNbB-0003qe-AQ for mharc-grub-devel@gnu.org; Tue, 21 Jul 2009 18:14:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTNb9-0003qK-QB for grub-devel@gnu.org; Tue, 21 Jul 2009 18:14:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTNb5-0003q4-Bs for grub-devel@gnu.org; Tue, 21 Jul 2009 18:14:11 -0400 Received: from [199.232.76.173] (port=45058 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTNb5-0003q1-7o for grub-devel@gnu.org; Tue, 21 Jul 2009 18:14:07 -0400 Received: from mail-fx0-f223.google.com ([209.85.220.223]:57283) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTNb4-0002Ej-UK for grub-devel@gnu.org; Tue, 21 Jul 2009 18:14:07 -0400 Received: by fxm23 with SMTP id 23so986498fxm.42 for ; Tue, 21 Jul 2009 15:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=+kZvwy5UMEBq7mt4HvGnuYnABqGONettzICBCrBI6pk=; b=JXzZXiidNWYjcqHq0c1SrHgXNuHY6L7UsXWWMdwHPmAEHzf1YrtpNPvTS8fQ+tF5St gmGk8mnhGSEbHe6962HuGQ0KMEWYFBdQhDwDaO9DvgHVp0PAb0gJzumMEC6QFVUCJ0xf QeI7AtE1rAXGgMRnd4HRNaVZKPelMT2C3e3Ts= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=P01XZmQpxdjQ/ElN8omRFE/hOyQn69OazoACmUvdsktEcVkEx7tlOBFyjJSDMvHuO5 ef9M+biXY1WofW5ebuvR7m52o55J6a7YF1bteYtihSNJDBitRFTst6fUj5+axCmDdSIS FkaHUWQfpQyZahKPIoADSTi6jRbsj8Fzb0Z2g= Received: by 10.86.74.1 with SMTP id w1mr201537fga.76.1248214446252; Tue, 21 Jul 2009 15:14:06 -0700 (PDT) Received: from ?192.168.1.100? (89.141.11.145.dyn.user.ono.com [89.141.11.145]) by mx.google.com with ESMTPS id 3sm9146698fge.3.2009.07.21.15.14.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Jul 2009 15:14:05 -0700 (PDT) Message-ID: <4A66218A.3020506@gmail.com> Date: Tue, 21 Jul 2009 22:14:02 +0200 From: =?ISO-8859-1?Q?Javier_Mart=EDn?= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: The development of GRUB 2 References: <1248196443.27068.86.camel@mj> <4A660CE9.6040104@gmail.com> <1248211910.18091.8.camel@mj> <1248213902.18091.20.camel@mj> In-Reply-To: <1248213902.18091.20.camel@mj> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] UUID support for UFS X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 22:14:11 -0000 Pavel Roskin escribió: > On Tue, 2009-07-21 at 23:45 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> This change would allow to produce a code which is cleaner, easier to >> read and understand. However I'm opposed to modifying printf function >> for it. > > I think Javier misspoke or didn't realize that *printf doesn't need to > be modified. Indeed, I didn't realise so. All that's required is a grub_inttypes header that either takes from the system stdint.h types or just defines the macros you were discussing. > >> Instead we could just define somewhere: >> GRUB_PRIx32 "%x" > > Better yet, "x", as in libc. That would allow for "%08x" that we need > for UUID. Yeah, that is the format used in libc. I copied the example wrong, without the "%08"s. > > But I would prefer that we work on fixing bugs rather than non-bugs. > "Fixing" this would allow us to have cleaner code, and separate "casual variables" from fixed-length variables. If we print int with %d and int32_t with PRId32, the impact of the subtle bugs that appear when we port across architectures will be reduced.