From d2ff996240e57a6d1e6eaa5510c6a27f562b49e1 Mon Sep 17 00:00:00 2001 From: dg Date: Fri, 5 Aug 1994 12:38:06 +0000 Subject: Changed output formatting to 0 pad hex bytes if necessary. This makes the output consistent with traditional representations of ethernet addresses. I still don't like the spacing in netstat -i, however. --- usr.bin/netstat/if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/netstat') diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 3f12f53..f99e84a 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -189,7 +189,7 @@ intpr(interval, ifnetaddr) cp = sa->sa_data; hexprint: while (--n >= 0) - m += printf("%x%c", *cp++ & 0xff, + m += printf("%02x%c", *cp++ & 0xff, n > 0 ? '.' : ' '); m = 28 - m; while (m-- > 0) -- cgit v1.1