From: Joe Perches <joe@perches.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vsprintf: add Bluetooth UUID %pU[rR] format specifier
Date: Sat, 19 Oct 2013 14:24:53 -0700 [thread overview]
Message-ID: <1382217893.2041.27.camel@joe-AO722> (raw)
In-Reply-To: <1382199949-26779-1-git-send-email-marcel@holtmann.org>
On Sat, 2013-10-19 at 09:25 -0700, Marcel Holtmann wrote:
> The Bluetooth UUID is used in big endian reversed order. Add new
> modifier to print a UUID in big endian, but where the input byte
> stream is actually in reversed order.
> This is similar to %pMR that allows to print a MAC address in
> reversed order since that is how the Bluetooth BD_ADDR is
> actually represented in a byte stream.
Seems sensible. Other than print_bt_uuid, is
there another place where will it be used?
Are you going to convert print_bt_uuid to use this?
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
> @@ -1106,6 +1106,7 @@ char *uuid_string(char *buf, char *end, const u8 *addr,
> static const u8 le[16] = {3,2,1,0,5,4,7,6,8,9,10,11,12,13,14,15};
> const u8 *index = be;
> bool uc = false;
> + bool reversed = false;
>
> switch (*(++fmt)) {
Could there ever be a little endian reversed UUID?
Might it be useful to change this to:
while (isalpha(*++fmt)) {
switch (*fmt) {
etc?
next prev parent reply other threads:[~2013-10-19 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-19 16:25 Marcel Holtmann
2013-10-19 21:24 ` Joe Perches [this message]
2013-10-19 22:30 ` Marcel Holtmann
2013-10-19 22:43 ` Joe Perches
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=1382217893.2041.27.camel@joe-AO722 \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®