diff options
author | dg <dg@FreeBSD.org> | 1994-08-05 12:38:06 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-05 12:38:06 +0000 |
commit | d2ff996240e57a6d1e6eaa5510c6a27f562b49e1 (patch) | |
tree | b5321344fa12bd5904c34701879419020cf9b3cc /usr.bin | |
parent | f25724c99eaa4338d74d1219fcf2352fa187fb61 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.bin/netstat/if.c | 2 |
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) |