summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorkre <kre@NetBSD.org>2023-03-27 23:20:13 +0000
committerkre <kre@NetBSD.org>2023-03-27 23:20:13 +0000
commit0bfe7365937d66e74b0d964fc0ad76288a147f25 (patch)
tree86ebed127343fc551ea9509862d53e27e20a0211 /sys/dev/microcode
parent36581daa3bce971c0d728cd79373fdb0955c76b7 (diff)
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.
Diffstat (limited to 'sys/dev/microcode')
0 files changed, 0 insertions, 0 deletions