xfs-masters
[Top] [All Lists]

Re: [PATCH 1/9] lib/vsprintf.c: Add %pU to print UUID/GUIDs

To: Joe Perches <joe@xxxxxxxxxxx>
Subject: Re: [PATCH 1/9] lib/vsprintf.c: Add %pU to print UUID/GUIDs
From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date: Thu, 1 Oct 2009 10:55:56 +0200
Cc: linux-kernel@xxxxxxxxxxxxxxx, Adrian Hunter <adrian.hunter@xxxxxxxxx>, Alex Elder <aelder@xxxxxxx>, Artem Bityutskiy <dedekind@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Harvey Harrison <harvey.harrison@xxxxxxxxx>, Huang Ying <ying.huang@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxxx>, Laurent Pinchart <laurent.pinchart@xxxxxxxxx>, Matt Mackall <mpm@xxxxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>, Neil Brown <neilb@xxxxxxx>, Steven Whitehouse <swhiteho@xxxxxxxxxx>, xfs-masters@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=wnvzDfXuufc7mFyjwSqPTuEgdHV47KHbXGW4fsaWM5g=; b=p1iY2e6NZB0e+ErHC8eLHDmw3kNUC4hU5cb/ZZqLd8ZBsOOl9SkFcR/lT3mjhvDudW 9yJOoI4MWlujP8Kvc958WhL/FPvowIN52gZ8pHKxBwpPPsq5INhkNs4EdpOM0VTP6FUG NxJr60GXxSYpJ5sZDCipJKGsBbVVXrT9mMG4s=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=hjnuKpwxg8+8YtPMmHOe1EtfUbTvcybdWSe8xnJo9mH+WrxxqqQU6BUmSDpTW4ATa1 LsKvhOfIheycoCRp17xGsjC4SAN610MOtWwfXiKplqp08greagKGCq1eQGvFwZO3Hypw Jvlgyu46XqGCaz8FF7BM2uxs5QPpIzgEXPZVk=
In-reply-to: <1254382000.1799.13.camel@xxxxxxxxxxxxxxx>
References: <cover.1254193019.git.joe@xxxxxxxxxxx> <f28939e0018c7e2a9e898722e0fb8514a843b14c.1254193019.git.joe@xxxxxxxxxxx> <10f740e80910010010o4522a008h265e09d7988d7192@xxxxxxxxxxxxxx> <1254382000.1799.13.camel@xxxxxxxxxxxxxxx>
Sender: geert.uytterhoeven@xxxxxxxxx
On Thu, Oct 1, 2009 at 09:26, Joe Perches <joe@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx

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

<Prev in Thread] Current Thread [Next in Thread>