summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-05 12:38:06 +0000
committerdg <dg@FreeBSD.org>1994-08-05 12:38:06 +0000
commitd2ff996240e57a6d1e6eaa5510c6a27f562b49e1 (patch)
treeb5321344fa12bd5904c34701879419020cf9b3cc /usr.bin/netstat
parentf25724c99eaa4338d74d1219fcf2352fa187fb61 (diff)
downloadFreeBSD-src-d2ff996240e57a6d1e6eaa5510c6a27f562b49e1.zip
FreeBSD-src-d2ff996240e57a6d1e6eaa5510c6a27f562b49e1.tar.gz
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.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/if.c2
1 files changed, 1 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud