All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] UUID support for UFS
Date: Tue, 21 Jul 2009 17:31:50 -0400	[thread overview]
Message-ID: <1248211910.18091.8.camel@mj> (raw)
In-Reply-To: <4A660CE9.6040104@gmail.com>

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<proski@gnu.org> 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 <inttypes.h> 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



  reply	other threads:[~2009-07-21 21:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 13:03 [PATCH] UUID support for UFS Vladimir 'phcoder' Serbinenko
2009-07-21 17:14 ` Pavel Roskin
2009-07-21 20:01   ` Vladimir 'phcoder' Serbinenko
2009-07-21 18:46     ` Javier Martín
2009-07-21 21:31       ` Pavel Roskin [this message]
2009-07-21 21:45         ` Vladimir 'phcoder' Serbinenko
2009-07-21 22:05           ` Pavel Roskin
2009-07-21 20:14             ` Javier Martín
2009-07-21 22:37               ` Pavel Roskin
2009-07-21 21:34                 ` Javier Martín
2009-07-22  0:20                   ` Pavel Roskin
2009-07-22 17:47                   ` Robert Millan
2009-07-22 18:02                     ` Javier Martín
2009-07-22 17:44           ` Robert Millan
2009-07-21 20:04     ` Pavel Roskin
2009-07-22 17:40 ` Robert Millan
2009-07-22 17:47   ` Vladimir 'phcoder' Serbinenko
2009-07-22 18:01   ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248211910.18091.8.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.