freebsd-skq/usr.sbin/lsdev/lsdev.h
wollman 171476dff7 Updated to latest kernel code. Also provided a friendlier output format,
which is enabled by default (use `-c' to get the old format).  The new
format looks like this (only the values are correct; this was taken on my
machine with a slightly old kernel):

Device     St Parent     Description
---------- -- ---------- --------------------------------------------------
isa0       NC -
sc0        NC isa0       Parallel printer adapter
ed0        NC isa0       SMC8216/SMC8216C
sio0       NC isa0       RS-232 serial port
sio1       NC isa0       RS-232 serial port
fdc0       NC isa0       floppy disk/tape controller
fd0        NC fdc0       floppy disk
wdc0       NC isa0       ST506/ESDI/IDE disk controller
wd0        NC wdc0       ST506/ESDI/IDE disk
npx0       NC isa0       Floating-point unit

Note that many of these fields could be made more informative; I tried to make
my changes as unintrusive as possible.  See the `mcd' driver for an example
of one which actually does something with the `state' field.
1994-10-23 21:33:57 +00:00

18 lines
493 B
C

/*
* Declarations for lsdev(8).
*/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <vm/vm.h>
#include <sys/sysctl.h>
#include <sys/devconf.h>
extern const char *const devtypes[]; /* device type array */
extern void print_config(struct devconf *); /* machine-specific print routine */
extern void hprint_config(void); /* machine-specific header printer */
extern int vflag;
extern int findtype(const char *); /* get device type by name */