diff options
author | ken <ken@FreeBSD.org> | 1999-02-10 00:04:13 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 1999-02-10 00:04:13 +0000 |
commit | 542b263658139322bf3d5bd62bad9800e74aad45 (patch) | |
tree | b4c5c45958dd1ae9b164c02cc708e4fa28bf4bd4 /sys/isa/fd.c | |
parent | 4eda991f81cae280580852f81db79122e1013f3c (diff) | |
download | FreeBSD-src-542b263658139322bf3d5bd62bad9800e74aad45.zip FreeBSD-src-542b263658139322bf3d5bd62bad9800e74aad45.tar.gz |
Add a prioritization field to the devstat_add_entry() call so that
peripheral drivers can determine where in the devstat(9) list they are
inserted.
This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and
any ports that depend on the devstat code, since the size of the devstat
structure has changed. The devstat version number has been incremented as
well to reflect the change.
This sorts devices in the devstat list in "more interesting" to "less
interesting" order. So, for instance, da devices are now more important
than floppy drives, and so will appear before floppy drives in the default
output from systat, iostat, vmstat, etc.
The order of devices is, for now, kept in a central table in devicestat.h.
If individual drivers were able to make a meaningful decision on what
priority they should be at attach time, we could consider splitting the
priority information out into the various drivers. For now, though, they
have no way of knowing that, so it's easier to put them in an easy to find
table.
Also, move the checkversion() call in vmstat(8) to a more logical place.
Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and
for putting up with the long time it has taken me to commit it. Bruce did
object somewhat to the central priority table (he would rather the
priorities be distributed in each driver), so his objection is duly noted
here.
Reviewed by: bde, obrien
Diffstat (limited to 'sys/isa/fd.c')
-rw-r--r-- | sys/isa/fd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 9972a38..d0dd782 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.131 1999/01/15 09:15:27 bde Exp $ + * $Id: fd.c,v 1.132 1999/01/19 00:21:36 peter Exp $ * */ @@ -869,7 +869,8 @@ fdattach(struct isa_device *dev) devstat_add_entry(&fd->device_stats, "fd", fdu, 512, DEVSTAT_NO_ORDERED_TAGS, - DEVSTAT_TYPE_FLOPPY | DEVSTAT_TYPE_IF_OTHER); + DEVSTAT_TYPE_FLOPPY | DEVSTAT_TYPE_IF_OTHER, + DEVSTAT_PRIORITY_FD); } |