[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()

This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches
2007-10-03 17:59:30 -07:00
committed by David S. Miller
parent 95ea36275f
commit 0795af5729
228 changed files with 1876 additions and 1953 deletions

View File

@@ -243,12 +243,12 @@ static int recv_notification(struct notifier_block *nb, unsigned long evt,
static char *eth_addr2str(struct tipc_media_addr *a, char *str_buf, int str_size)
{
unchar *addr = (unchar *)&a->dev_addr;
DECLARE_MAC_BUF(mac);
if (str_size < 18)
*str_buf = '\0';
else
sprintf(str_buf, "%02x:%02x:%02x:%02x:%02x:%02x",
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
sprintf(str_buf, "%s", print_mac(mac, addr));
return str_buf;
}