diff options
-rw-r--r-- | sys/i386/isa/matcd/matcd.c | 38 | ||||
-rw-r--r-- | sys/i386/isa/sound/soundcard.c | 35 |
2 files changed, 72 insertions, 1 deletions
diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c index 830cf5b..03ae212 100644 --- a/sys/i386/isa/matcd/matcd.c +++ b/sys/i386/isa/matcd/matcd.c @@ -490,6 +490,14 @@ static struct kern_devconf kdc_matcd[TOTALDRIVES] = { { /*<12>*/ DC_IDLE, /*<12>Status*/ "Matsushita CD-ROM Controller" /*<12>This is the description*/ } }; /*<12>*/ + +#ifdef JREMOD +#include <sys/conf.h> +#define CDEV_MAJOR 46 +#define BDEV_MAJOR 17 +static void matcd_devsw_install(); +#endif /*JREMOD */ + #endif /*FREE2*/ @@ -1464,6 +1472,10 @@ int matcd_attach(struct isa_device *dev) } nextcontroller++; /*Bump ctlr assign to next number*/ printf("\n"); /*End line of drive reports*/ +#ifdef JREMOD + matcd_devsw_install(); +#endif /*JREMOD*/ + return(1); } @@ -2737,5 +2749,31 @@ static int matcd_igot(struct ioc_capability * sqp) audio are here*/ #endif /*FULLDRIVER*/ +#ifdef JREMOD +struct bdevsw matcd_bdevsw = + { matcdopen, matcdclose, matcdstrategy, matcdioctl, /*17*/ + nxdump, matcdsize, 0 }; + +struct cdevsw matcd_cdevsw = + { matcdopen, matcdclose, rawread, nowrite, /*46*/ + matcdioctl, nostop, nullreset, nodevtotty,/* SB cd */ + seltrue, nommap, matcdstrategy }; + +static matcd_devsw_installed = 0; + +static void matcd_devsw_install() +{ + dev_t descript; + if( ! matcd_devsw_installed ) { + descript = makedev(CDEV_MAJOR,0); + cdevsw_add(&descript,&matcd_cdevsw,NULL); +#if defined(BDEV_MAJOR) + descript = makedev(BDEV_MAJOR,0); + bdevsw_add(&descript,&matcd_bdevsw,NULL); +#endif /*BDEV_MAJOR*/ + matcd_devsw_installed = 1; + } +} +#endif /* JREMOD */ /*End of matcd.c*/ diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index 381ea31..8542e0a 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: soundcard.c,v 1.29 1995/09/08 19:57:13 bde Exp $ + * $Id: soundcard.c,v 1.30 1995/11/04 13:24:48 bde Exp $ */ #include "sound_config.h" @@ -36,6 +36,13 @@ #include "dev_table.h" #include <i386/isa/isa_device.h> +#ifdef JREMOD +#include <sys/conf.h> +#define CDEV_MAJOR 30 +static void snd_devsw_install(); +#endif /*JREMOD*/ + + u_int snd1_imask; u_int snd2_imask; u_int snd3_imask; @@ -342,6 +349,10 @@ sndattach (struct isa_device *dev) } #endif +#ifdef JREMOD + snd_devsw_install(); +#endif /*JREMOD*/ + return TRUE; } @@ -470,4 +481,26 @@ snd_release_irq(int vect) { } +#ifdef JREMOD +struct cdevsw snd_cdevsw = + { sndopen, sndclose, sndread, sndwrite, /*30*/ + sndioctl, nostop, nullreset, nodevtotty,/* sound */ + sndselect, nommap, NULL }; + +static snd_devsw_installed = 0; + +static void snd_devsw_install() +{ + dev_t descript; + if( ! snd_devsw_installed ) { + descript = makedev(CDEV_MAJOR,0); + cdevsw_add(&descript,&snd_cdevsw,NULL); +#if defined(BDEV_MAJOR) + descript = makedev(BDEV_MAJOR,0); + bdevsw_add(&descript,&snd_bdevsw,NULL); +#endif /*BDEV_MAJOR*/ + snd_devsw_installed = 1; + } +} +#endif /* JREMOD */ #endif |