diff options
author | julian <julian@FreeBSD.org> | 1995-09-03 05:43:50 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-09-03 05:43:50 +0000 |
commit | 3b421a628b770ce7d903f166e047d7dc8e672ed7 (patch) | |
tree | 48c036cfd246d74ad2a6c99044f9938396941363 /sys/dev/speaker/spkr.c | |
parent | 6759a9710d59bc29e3766f8fa8c2699111015c60 (diff) | |
download | FreeBSD-src-3b421a628b770ce7d903f166e047d7dc8e672ed7.zip FreeBSD-src-3b421a628b770ce7d903f166e047d7dc8e672ed7.tar.gz |
devfs changes..
changes to allow devices that don't probe (e.g. /dev/mem)
to create devfs entries
this required giving 'configure' its own SYSINIT entry
so we could duck in just before it with a DEVFS init
and some device inits..
my devfs now looks like:
./misc
./misc/speaker
./misc/mem
./misc/kmem
./misc/null
./misc/zero
./misc/io
./misc/console
./misc/pcaudio
./misc/pcaudioctl
./disks
./disks/rfloppy
./disks/rfloppy/fd0.1440
./disks/rfloppy/fd1.1200
./disks/floppy
./disks/floppy/fd0.1440
./disks/floppy/fd1.1200
also some sligt cleanups.. DEVFS needs a lot of work
but I'm getting back to it..
Diffstat (limited to 'sys/dev/speaker/spkr.c')
-rw-r--r-- | sys/dev/speaker/spkr.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 4c1f128..9a98251 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -4,7 +4,7 @@ * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> * - * $Id: spkr.c,v 1.13 1995/05/05 06:15:11 davidg Exp $ + * $Id: spkr.c,v 1.14 1995/05/30 08:03:09 rgrimes Exp $ */ #include "speaker.h" @@ -23,6 +23,20 @@ #include <machine/clock.h> #include <machine/speaker.h> +#ifdef DEVFS +#include <sys/devfsext.h> +#include "sys/kernel.h" +int spkropen(); + +void spkrdev_init(caddr_t data) /* data not used */ +{ + void * x; +/* path name devsw minor type uid gid perm*/ + x=dev_add("/misc", "speaker", spkropen, 0, DV_CHR, 0, 0, 0600); +} +SYSINIT(spkrdev,SI_SUB_DEVFS, SI_ORDER_ANY, spkrdev_init, NULL) +#endif /*DEVFS*/ + /**************** MACHINE DEPENDENT PART STARTS HERE ************************* * * This section defines a function tone() which causes a tone of given |