diff options
Diffstat (limited to 'sys/gnu/i386/isa/nic3008.c')
-rw-r--r-- | sys/gnu/i386/isa/nic3008.c | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/sys/gnu/i386/isa/nic3008.c b/sys/gnu/i386/isa/nic3008.c index 5a71444..0913003 100644 --- a/sys/gnu/i386/isa/nic3008.c +++ b/sys/gnu/i386/isa/nic3008.c @@ -1,6 +1,6 @@ -static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.8 1995/11/18 04:19:44 bde Exp $"; +static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.9 1995/11/21 14:56:01 bde Exp $"; /******************************************************************************* - * II - Version 0.1 $Revision: 1.8 $ $State: Exp $ + * II - Version 0.1 $Revision: 1.9 $ $State: Exp $ * * Copyright 1994 Dietmar Friede ******************************************************************************* @@ -10,6 +10,10 @@ static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.8 1995/11/18 04:19:44 bde E * ******************************************************************************* * $Log: nic3008.c,v $ + * Revision 1.9 1995/11/21 14:56:01 bde + * Completed function declarations, added prototypes and removed redundant + * declarations. + * * Revision 1.8 1995/11/18 04:19:44 bde * Fixed the type of nic_listen(). A trailing arg was missing. * @@ -63,7 +67,7 @@ static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.8 1995/11/18 04:19:44 bde E #include "ioctl.h" #include "kernel.h" #include "systm.h" -#include "conf.h" +#include <sys/conf.h> #include <sys/proc.h> #include "i386/isa/isa_device.h" @@ -71,6 +75,14 @@ static char nic38_id[] = "@(#)$Id: nic3008.c,v 1.8 1995/11/18 04:19:44 bde E #include "gnu/i386/isa/niccyreg.h" #include "gnu/isdn/isdn_ioctl.h" +#ifdef JREMOD +#ifdef DEVFS +#include <sys/devfsext.h> +#endif /*DEVFS*/ +#define CDEV_MAJOR 54 +#endif /*JREMOD*/ + + #define OPEN 1 #define LOAD_HEAD 3 #define LOAD_DATA 5 @@ -1206,4 +1218,37 @@ nicintr(int unit) } } + +#ifdef JREMOD +struct cdevsw nic_cdevsw = + { nicopen, nicclose, noread, nowrite, /*54*/ + nicioctl, nostop, nullreset, nodevtotty,/* nic */ + seltrue, nommap, NULL }; + +static nic_devsw_installed = 0; + +static void nic_drvinit(void *unused) +{ + dev_t dev; + + if( ! nic_devsw_installed ) { + dev = makedev(CDEV_MAJOR,0); + cdevsw_add(&dev,&nic_cdevsw,NULL); + nic_devsw_installed = 1; +#ifdef DEVFS + { + int x; +/* default for a simple device with no probe routine (usually delete this) */ + x=devfs_add_devsw( +/* path name devsw minor type uid gid perm*/ + "/", "nic", major(dev), 0, DV_CHR, 0, 0, 0600); + } + } +#endif +} + +SYSINIT(nicdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,nic_drvinit,NULL) + +#endif /* JREMOD */ + #endif /* NNIC > 0 */ |