freebsd-dev/usr.bin/systat
Bruce Evans 18d3a03e13 Backed out rev.1.49 since it had buffer overruns and only worked
accidentally.

Read buffer overruns:
The size of the target array (TSOTTA == 10) is a wrong limit to use for
scanning the source string.

Write buffer overruns:
TSOTTA is also a wrong limit to use for copying to the target buffer,
since we want to add a NUL terminator afterwards.  TSOTTA was also 1
too small for holding both the desired number of visible characters
and the NUL.

Worked accidentally:
There is error in the algorithm that tends to result in the space saved
by stripping "irq" not actually being used, but some cases worked
accidentally provided "irqN" is near the end of the source string and
"N" is only 1 digit.

Starting with 5.mumble-CURRENT, "irqN" is at the beginning of the
string on all (?) arches that have it and the accidents don't happen.
E.g. on i386's, the keyboard irq is now named
"irq1: atkbd0<bogus blank padding>" by the kernel, and this name was
converted to "1: atkb" -- not only the device number but part of the
device name has been lost --, while before 5.mumble the kernel name
was "atkbd0 irq1" and systat accidentally preserved the irq number to
give "atkbd0 1".  The ":" in the string wastes precious space, and
stripping "irq" results in descriptions starting with numbers which
makes them look too much like counts.  This commit just fixes the last
problem.
2006-04-30 00:50:08 +00:00
..
cmds.c
cmdtab.c Add ip6 and icmp6 displays to systat. 2003-08-01 20:28:20 +00:00
convtbl.c Consistently use __inline instead of __inline__ as the former is an empty macro 2004-07-04 16:11:03 +00:00
convtbl.h Fix the easy warnings: 2004-03-09 11:57:28 +00:00
devs.c When a numeric field overflows its width, try formatting the number in 2003-10-20 20:13:50 +00:00
devs.h
extern.h Fix the easy warnings: 2004-03-09 11:57:28 +00:00
fetch.c
icmp6.c Add ip6 and icmp6 displays to systat. 2003-08-01 20:28:20 +00:00
icmp.c
ifcmds.c Fix the easy warnings: 2004-03-09 11:57:28 +00:00
ifstat.c Fix the easy warnings: 2004-03-09 11:57:28 +00:00
iostat.c Copy cur's snap_time to last when refreshing statistics. Fixes problem 2003-11-01 02:06:02 +00:00
ip6.c Add ip6 and icmp6 displays to systat. 2003-08-01 20:28:20 +00:00
ip.c
keyboard.c
main.c Fix the easy warnings: 2004-03-09 11:57:28 +00:00
Makefile Put libdevstat before libkvm, because the former depends on the latter. 2004-02-04 10:20:43 +00:00
mbufs.c Remove unused variables. 2005-04-09 14:31:41 +00:00
mode.c
mode.h
netcmds.c
netstat.c simply ignore unknown address family. 2005-02-19 16:54:26 +00:00
pigs.c Include systat.h for cmdtab, to make gcc4 happy. 2005-05-02 10:50:10 +00:00
swap.c
systat.1 Abbreviate long field descriptors at write time so that they don't get 2006-04-29 21:30:23 +00:00
systat.h
tcp.c Demangled vendor ids. Fixed misplaced FreeBSD id. 2004-02-25 13:26:53 +00:00
vmstat.c Backed out rev.1.49 since it had buffer overruns and only worked 2006-04-30 00:50:08 +00:00