From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MTMwN-0003Jx-1i for mharc-grub-devel@gnu.org; Tue, 21 Jul 2009 17:32:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTMwK-0003Jj-Ht for grub-devel@gnu.org; Tue, 21 Jul 2009 17:32:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTMwF-0003JX-43 for grub-devel@gnu.org; Tue, 21 Jul 2009 17:31:59 -0400 Received: from [199.232.76.173] (port=53802 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTMwE-0003JU-S6 for grub-devel@gnu.org; Tue, 21 Jul 2009 17:31:54 -0400 Received: from c60.cesmail.net ([216.154.195.49]:12138) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MTMwE-0004ns-DL for grub-devel@gnu.org; Tue, 21 Jul 2009 17:31:54 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 21 Jul 2009 17:31:53 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id D8B4C34C6A for ; Tue, 21 Jul 2009 17:42:18 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <4A660CE9.6040104@gmail.com> References: <1248196443.27068.86.camel@mj> <4A660CE9.6040104@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" Date: Tue, 21 Jul 2009 17:31:50 -0400 Message-Id: <1248211910.18091.8.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 8bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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 21:32:01 -0000 On Tue, 2009-07-21 at 20:46 +0200, Javier Martín wrote: > Vladimir 'phcoder' Serbinenko escribió: > > On Tue, Jul 21, 2009 at 7:14 PM, Pavel Roskin wrote: > >> On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: > >>> + grub_sprintf (*uuid, "%08lx%08lx", > >>> + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidhi), > >>> + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidlow)); > >> unsigned long is 64-bit on x86_64. unsigned int would do just fine > >> here. > > Ok > We could use the macros for [u]intN_t types: > grub_sprintf (*uuid, PRIx32 "-" PRIx32, > grub_le_to_cpu32 (data->sblock.uuidhi), > grub_le_to_cpu32 (data->sblock.uuidlow)); > Of course, our *printf functions would have to recognize them, and we'd > have to provide a suitable default for the header if the system compiler > is not C99 compliant, but I think it's a good step forwards. > > I would be willing to implement such a header/change to the *printf > functions if there's any interest in them. I think we shouldn't overengineer this. We don't support platforms where int is not 32-bit. If we add support for such platform, we'll have more issues than just printf. -- Regards, Pavel Roskin