[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130716.135857.1132486724952537431.davem@davemloft.net>
Date: Tue, 16 Jul 2013 13:58:57 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: joe@...ches.com
Cc: netdev@...r.kernel.org
Subject: Re: sysfs_format_mac
From: Joe Perches <joe@...ches.com>
Date: Tue, 16 Jul 2013 13:46:26 -0700
> On Tue, 2013-07-16 at 12:56 -0700, David Miller wrote:
>>
>> I assume that the only reason sysfs_format_mac() exists at all, and
>> don't just use scnprintf() calls with "%pm\n", is that some devices
>> have MAC addresses which are not 6 bytes in length.
>>
>> But it's such a waste to have this special case piece of code
>> just for that.
>>
>> It would make so much more sense to allow specifying a length
>> specifier to %pm and friends.
>
> scnprintf("%*ph", (int)size, buffer)
Yes, exactly, something like that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists