From 76597ff989a1fbaa9b9a1e54007cd759bf257ab7 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Mon, 30 Jul 2012 14:40:23 -0700 Subject: vsprintf: add %pMR for Bluetooth MAC address Bluetooth uses mostly LE byte order which is reversed for visual interpretation. Currently in Bluetooth in use unsafe batostr function. This is a slightly modified version of Joe's patch (sent Sat, Dec 4, 2010). Signed-off-by: Andrei Emeltchenko Cc: Joe Perches Cc: Marcel Holtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Documentation/printk-formats.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/printk-formats.txt') diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 5df176ed59b8..d8d168fa79d6 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -56,6 +56,7 @@ Struct Resources: MAC/FDDI addresses: %pM 00:01:02:03:04:05 + %pMR 05:04:03:02:01:00 %pMF 00-01-02-03-04-05 %pm 000102030405 @@ -67,6 +68,10 @@ MAC/FDDI addresses: the 'M' specifier to use dash ('-') separators instead of the default separator. + For Bluetooth addresses the 'R' specifier shall be used after the 'M' + specifier to use reversed byte order suitable for visual interpretation + of Bluetooth addresses which are in the little endian order. + IPv4 addresses: %pI4 1.2.3.4 -- cgit v1.2.3