[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10f740e80910010155jdf5c898x80a3a848182148a1@mail.gmail.com>
Date: Thu, 1 Oct 2009 10:55:56 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Joe Perches <joe@...ches.com>
Cc: linux-kernel@...r.kernel.org,
Adrian Hunter <adrian.hunter@...ia.com>,
Alex Elder <aelder@....com>,
Artem Bityutskiy <dedekind@...radead.org>,
Christoph Hellwig <hch@....de>,
Harvey Harrison <harvey.harrison@...il.com>,
Huang Ying <ying.huang@...el.com>, Ingo Molnar <mingo@...e.hu>,
Jeff Garzik <jgarzik@...hat.com>,
Laurent Pinchart <laurent.pinchart@...net.be>,
Matt Mackall <mpm@...enic.com>,
Mauro Carvalho Chehab <mchehab@...radead.org>,
Neil Brown <neilb@...e.de>,
Steven Whitehouse <swhiteho@...hat.com>,
xfs-masters@....sgi.com, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 1/9] lib/vsprintf.c: Add %pU to print UUID/GUIDs
On Thu, Oct 1, 2009 at 09:26, Joe Perches <joe@...ches.com> wrote:
> On Thu, 2009-10-01 at 09:10 +0200, Geert Uytterhoeven wrote:
>> > Standardize the printed style of UUID/GUIDs by using
>> > another extension to %p.
>> >
>> > %pU: 01020304-0506-0708-090a-0b0c0d0e0f10
>> > %pUr: 04030201-0605-0807-090a-0b0c0d0e0f10
>> > %pU[r]X:Use upper case hex
>>
>> To me, it looks a bit strange to have the options after the `U', combined with
>> the variable-length nature.
>
> I think the whole %p<foo> mechanism is strange and takes
> a bit of getting used to.
>
> You're free to suggest alternatives.
>
> Keep in mind expansion for future different types and that
> <foo> must be alphanumeric chars only.
`r' is reverse endianness?
So what about
%pUb: lower case big endian
%pUl: lower case little endian
%pUB: upper case big endian
%pUL: upper case little endian
?
That way it's fixed length, and easier to parse.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists