On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote:
> there are better approaches to this,
> how about just calling:
>
> print_mac(dev->dev_addr);
>
> Sure, we'll have to split up printk() calls, but in the end it's
> likely still smaller and better. And I think it's much cleaner
> than this macro stuff.
My original patch had the equivalent of
char* print_mac(char* buf, const char* addr) {
sprintf(buf,"%02x:...", addr[0]...)
return buf;
}
and used:
DECLARE_MAC_BUF(var); //same as char var[18];
printk(MAC_FMT, MAC_ARG(var, addr));
which didn't require splitting printk()s
I've still got the original patch.
It's just substituting EUI48 for MAC and forward porting.
Want something like that?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html