aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netconsole.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/netconsole.c
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[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>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r--drivers/net/netconsole.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 69ef1eb03bea..5ffbb8891647 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -306,18 +306,16 @@ static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf)
306 306
307static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) 307static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
308{ 308{
309 return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n", 309 DECLARE_MAC_BUF(mac);
310 nt->np.local_mac[0], nt->np.local_mac[1], 310 return snprintf(buf, PAGE_SIZE, "%s\n",
311 nt->np.local_mac[2], nt->np.local_mac[3], 311 print_mac(mac, nt->np.local_mac));
312 nt->np.local_mac[4], nt->np.local_mac[5]);
313} 312}
314 313
315static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) 314static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf)
316{ 315{
317 return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n", 316 DECLARE_MAC_BUF(mac);
318 nt->np.remote_mac[0], nt->np.remote_mac[1], 317 return snprintf(buf, PAGE_SIZE, "%s\n",
319 nt->np.remote_mac[2], nt->np.remote_mac[3], 318 print_mac(mac, nt->np.remote_mac));
320 nt->np.remote_mac[4], nt->np.remote_mac[5]);
321} 319}
322 320
323/* 321/*