Subject: bin/3451: visual bug in netstat
To: None <gnats-bugs@gnats.netbsd.org>
From: Anders Hjalmarsson <econahja@econahja.econ.gu.se>
List: netbsd-bugs
Date: 04/06/1997 12:44:33
>Number: 3451
>Category: bin
>Synopsis: netstat output is not adjusted
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 6 03:50:01 1997
>Last-Modified:
>Originator: Anders Hjalmarsson
>Organization:
>Release: NetBSD-current sup'ed on April 5, 1997
>Environment:
System: NetBSD econahja.econ.gu.se 1.2D NetBSD 1.2D (ECONAHJA) #11: Wed Mar 26 23:30:42 MET 1997 econahja@econahja.econ.gu.se:/usr/src/sys/arch/i386/compile/ECONAHJA i386
>Description:
The output of "netstat -in" is not properly adjusted.
The <Link> and link addesses are to short
>How-To-Repeat:
Run netstat -in
>Fix:
Diffs from $NetBSD: if.c,v 1.21 1997/04/03 04:46:45 christos Exp $
*** if.c.old Thu Apr 3 14:28:44 1997
--- if.c Sun Apr 6 12:27:10 1997
***************
*** 219,225 ****
hexsep = ':', hexfmt = "%02x%c";
n = sdl->sdl_alen;
}
! m = printf("%-11.11s ", "<Link>");
goto hexprint;
default:
m = printf("(%d)", sa->sa_family);
--- 219,225 ----
hexsep = ':', hexfmt = "%02x%c";
n = sdl->sdl_alen;
}
! m = printf("%-13.13s ", "<Link>");
goto hexprint;
default:
m = printf("(%d)", sa->sa_family);
***************
*** 231,237 ****
while (--n >= 0)
m += printf(hexfmt, *cp++ & 0xff,
n > 0 ? hexsep : ' ');
! m = 30 - m;
while (m-- > 0)
putchar(' ');
break;
--- 231,237 ----
while (--n >= 0)
m += printf(hexfmt, *cp++ & 0xff,
n > 0 ? hexsep : ' ');
! m = 32 - m;
while (m-- > 0)
putchar(' ');
break;
>Audit-Trail:
>Unformatted: