Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755205AbbLKPmj (ORCPT ); Fri, 11 Dec 2015 10:42:39 -0500 Received: from mail-qk0-f169.google.com ([209.85.220.169]:35014 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753665AbbLKPm2 (ORCPT ); Fri, 11 Dec 2015 10:42:28 -0500 MIME-Version: 1.0 In-Reply-To: <20151210150609.GA23337@localhost.localdomain> References: <1449702413-25598-1-git-send-email-keith.busch@intel.com> <1449703300.25389.95.camel@perches.com> <20151210150609.GA23337@localhost.localdomain> Date: Fri, 11 Dec 2015 17:42:27 +0200 Message-ID: Subject: Re: [PATCHv3] printf: Add format for 8-byte EUI-64 type From: Andy Shevchenko To: Keith Busch , Rasmus Villemoes Cc: Joe Perches , linux-nvme@lists.infradead.org, LKML , Matthew Wilcox , Greg Kroah-Hartman , Jens Axboe , Christoph Hellwig , Dan Williams Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1533 Lines: 39 +Rasmus. On Thu, Dec 10, 2015 at 5:06 PM, Keith Busch wrote: > On Wed, Dec 09, 2015 at 03:21:40PM -0800, Joe Perches wrote: >> On Wed, 2015-12-09 at 16:06 -0700, Keith Busch wrote: >> > MAC addresses may be formed using rules based on EUI-64, which is 2 bytes >> > longer than a typical 6-byte MAC. This patch adds a long specifier to >> > the %pM format to support the extended unique identifier. >> > >> > Since there are multiple valid possible permutations of format specifiers, >> > the decoding is done in a loop, and the default ':' separator is >> > initialized at declaration time. A side effect of this allows 'F' and >> > 'R' both be specified, so these are appended to the documentation. >> >> Just thought of this: >> >> An alternative is using a format of "%8phC" >> >> Is there a use case for a bluetooth or FDDI EUI-64? > > *facepalm* > > I didn't know that format, but it satisfies my needs. I am not aware of > bluetooth or fddi using eui64, so I've no problem withdrawing the patch. > I'll just fix up the one that depended on it. Of course you might try to add reversed support for %*ph. Also you may consider print_hex_dump() [hex_dump_to_buffer()], though it looks like overkill in particular here. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/