History log of /src/usr.bin/systat/disks.c |
Revision | | Date | Author | Comments |
1.20 |
| 27-Mar-2023 |
kre | Undo previous "restore lost break" and fix the issue that seems to have been intending to correct properly (or at least, more rationally).
This makes adding/deleting drives for "vmstat" (and "iostat", though the man page doesn't say that it also works there) using the :display :ignore and :drive sub-commands work sensibly using fnmatch() rather than what was there most of the time since it was added.
Previously ":ignore dk*" would ignore the first dk (wedge) found in the system (whether or not it was ignored already) and that was it. [":ignore dk* dk*" would just do that twice.]
Now the same command will ignore all dk* drives (all wedges), which is what I would anticipate almost anyone would expect it to do.
Similarly for ":display" (to add drives) and ":drives" to explictly list particular ones.
When the fnmatch() code was added, almost 9 and a half years ago now, it was almost correct - except always resulted in an error occurring (though that was little more than a minor inconvenience).
That was "fixed" 5 months later (9 years and almost a month ago now) with the cvs log message "restore lost break" - which was absolutely the wrong thing to do (the break was fine when no patterns were used, and so a name could only ever match one drive - but wrong when the whole point is to match many).
Somehow in the past 9+ years, no-one noticed that this functionality had been rendered almost useless.
While here, fix a related problem ... just above I referred to the error that occurred as a "minor inconvenience" - that's because while an error would be shown on the screen, it would then immediately be removed again, an observant user might notice the quick flash, but that would be it.
Handle that by detecting whether any changes are actually made, and don't go completely redrawing the screen (removing the error message that was just placed there) if there is no point. This doesn't entirely fix this problem, as if we do
:drives foo wd*
and there is no "foo" drive in the system, we'd get an error message from that, but adding the wd* drives (assuming there are some, of course) counts as a change, so that error message will still not last very long. The order of that command line makes no difference, it isn't that wd drives were found after foo wasn't, but that the whole line matched (at least one) drive (and changed its state - for the "drives" command, that is equivalent to matched) - but also contained an entry which did not match at all. That's a harder problem to fix.
No pullups planned, as no-one seems to mind how it has been all this time.
|
1.19 |
| 08-Mar-2014 |
jdc | Restore lost break.
|
1.18 |
| 18-Oct-2013 |
bad | Make :drives, :display, :ignore accept fnmatch(3) patterns to specify drives. Bump man page date.
|
1.17 |
| 13-Apr-2009 |
lukem | branches: 1.17.6; 1.17.12; Fix -Wsign-compare issues
|
1.16 |
| 14-Apr-2006 |
blymn | branches: 1.16.30; Update to use new kernel io statistics.
|
1.15 |
| 26-Feb-2005 |
dsl | Refresh labels and display after changing displayed disks
|
1.14 |
| 12-Sep-2003 |
mycroft | WRT disk commands, make the man page consistent with the program, and add the feature I expected.
|
1.13 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
|
1.12 |
| 01-Dec-2000 |
simonb | Remove extern variables and functions now declared in dkstats.h. While here, remove 77 (!) unneed #includes.
|
1.11 |
| 05-Jul-2000 |
ad | - Add `boot', `run', `time' and `zero' commands to all IP displays. These work as in the `vmstat' display mode. The default mode is now `time', not `boot'. - ANSIfy. - s@kre\(@vmstat\(@. - __RCSID() police. - Tweak inet.icmp display visual a little.
|
1.10 |
| 05-Jun-2000 |
mycroft | branches: 1.10.2; Fix bogons in command parsing for >1 arg.
|
1.9 |
| 20-Dec-1999 |
jwise | branches: 1.9.2; Two things:
1.) fix a bug which caused coredumps when starting with no mode arguments 2.) move to table-lookup for mode-specific command parsing as well. all command matching is now table-driven.
|
1.8 |
| 19-Dec-1998 |
christos | branches: 1.8.6; char -> unsigned char
|
1.7 |
| 12-Jul-1998 |
mrg | - KNF - use snprintf - don't overwrite the keyboard buffer (and make this sized on the window size).
|
1.6 |
| 19-Oct-1997 |
lukem | fix .Nm usage, deprecate register, getopt returns -1 not EOF, s/[br]*/[ms]*/
|
1.5 |
| 21-Jul-1997 |
mrg | - some KNF. - use __RCSID(). - WARNS=1
|
1.4 |
| 10-May-1996 |
thorpej | New userland code to read the statistics kept by the NetBSD generic disk framework, from John M. Vinopal <banshee@gabriella.resort.com>
|
1.3 |
| 15-Mar-1996 |
ragge | Removed a couple of #ifdef vax causing systat to malfunction.
|
1.2 |
| 20-Jan-1995 |
jtc | Changed to conform to NetBSD's new RCS Id convention.
|
1.1 |
| 20-Jan-1995 |
jtc | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 20-Jan-1995 |
jtc | imported from 44lite
|
1.8.6.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.9.2.1 |
| 23-Jun-2000 |
minoura | Sync w/ netbsd-1-5-base.
|
1.10.2.1 |
| 01-Sep-2000 |
ad | Pull up the following revisions, approved by releng-1-5:
- Add "boot", "run", "time" and "zero" commands to all IP displays. These work as in the "vmstat" display mode. The default mode is now "time", not "boot". - ANSIfy. - s@kre\(@vmstat\(@. - __RCSID() police. - Tweak inet.icmp display visual a little.
bufcache.c 1.8 cmds.c 1.22 cmdtab.c 1.16 disks.c 1.11 extern.h 1.23 fetch.c 1.7 globalcmds.c 1.8
|
1.16.30.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.17.12.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.17.6.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|