lkml.org 
[lkml]   [2013]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] vsprintf: add Bluetooth UUID %pU[rR] format specifier
From
Date
On Sun, 2013-10-20 at 13:36 -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.

Thanks Marcel.

This looks fine to me but for one nit that you
didn't add.

> diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
[]
> @@ -159,12 +159,18 @@ UUID/GUID addresses:
> %pUB 00010203-0405-0607-0809-0A0B0C0D0E0F
> %pUl 03020100-0504-0706-0809-0a0b0c0e0e0f
> %pUL 03020100-0504-0706-0809-0A0B0C0E0E0F
> + %pUr 0f0e0d0c-0b0a-0908-0706-050403020100
> + %pUR 0F0E0D0C-0B0A-0908-0706-050403020100
>
> For printing 16-byte UUID/GUIDs addresses. The additional 'l', 'L',
> 'b' and 'B' specifiers are used to specify a little endian order in
> lower ('l') or upper case ('L') hex characters - and big endian order
> in lower ('b') or upper case ('B') hex characters.
>
> + The additional 'r' and 'R' specifiers are used to specify reversed
> + big endian order in either lower ('r') or upper case ('R') hex
> + characters. This is useful for Bluetooth UUID addresses.
> +
> Where no additional specifiers are used the default little endian
> order with lower case hex characters will be printed.

The default is actually big endian lower case

It'd be nice to fix after this is accepted.



\
 
 \ /
  Last update: 2013-10-21 09:41    [W:0.047 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site