diff options
Diffstat (limited to 'sys/i386')
33 files changed, 147 insertions, 709 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index 69c5692..eb5ed62 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -15,19 +15,14 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.101 1999/08/22 14:48:00 iwasaki Exp $ + * $Id: apm.c,v 1.102 1999/08/22 19:51:33 peter Exp $ */ -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/eventhandler.h> #include <sys/conf.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <sys/time.h> #include <sys/reboot.h> #include <sys/bus.h> @@ -79,9 +74,6 @@ struct apm_softc { int event_ptr; struct apm_event_info event_list[APM_NEVENTS]; u_char event_filter[APM_NPMEV]; -#ifdef DEVFS - void *sc_devfs_token; -#endif }; #define SCFLAG_ONORMAL 0x0000001 #define SCFLAG_OCTL 0x0000002 @@ -1131,10 +1123,7 @@ apm_attach(device_t dev) sc->initialized = 1; -#ifdef DEVFS - sc->sc_devfs_token = - devfs_add_devswf(&apm_cdevsw, 0, DV_CHR, 0, 0, 0600, "apm"); -#endif + make_dev(&apm_cdevsw, 0, 0, 0, 0600, "apm"); return 0; } diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 69c5692..eb5ed62 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -15,19 +15,14 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.101 1999/08/22 14:48:00 iwasaki Exp $ + * $Id: apm.c,v 1.102 1999/08/22 19:51:33 peter Exp $ */ -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/eventhandler.h> #include <sys/conf.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <sys/time.h> #include <sys/reboot.h> #include <sys/bus.h> @@ -79,9 +74,6 @@ struct apm_softc { int event_ptr; struct apm_event_info event_list[APM_NEVENTS]; u_char event_filter[APM_NPMEV]; -#ifdef DEVFS - void *sc_devfs_token; -#endif }; #define SCFLAG_ONORMAL 0x0000001 #define SCFLAG_OCTL 0x0000002 @@ -1131,10 +1123,7 @@ apm_attach(device_t dev) sc->initialized = 1; -#ifdef DEVFS - sc->sc_devfs_token = - devfs_add_devswf(&apm_cdevsw, 0, DV_CHR, 0, 0, 0600, "apm"); -#endif + make_dev(&apm_cdevsw, 0, 0, 0, 0600, "apm"); return 0; } diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 02827d0..4c37086 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -38,23 +38,19 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.62 1999/05/30 16:52:04 phk Exp $ + * $Id: mem.c,v 1.63 1999/05/31 11:25:44 phk Exp $ */ /* * Memory special file */ -#include "opt_devfs.h" #include "opt_perfmon.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> #include <sys/buf.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ #include <sys/kernel.h> #include <sys/uio.h> #include <sys/ioccom.h> @@ -118,51 +114,6 @@ static int random_ioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); struct mem_range_softc mem_range_softc; -#ifdef DEVFS -static void *mem_devfs_token; -static void *kmem_devfs_token; -static void *null_devfs_token; -static void *random_devfs_token; -static void *urandom_devfs_token; -static void *zero_devfs_token; -static void *io_devfs_token; -#ifdef PERFMON -static void *perfmon_devfs_token; -#endif - -static void memdevfs_init __P((void)); - -static void -memdevfs_init() -{ - mem_devfs_token = - devfs_add_devswf(&mem_cdevsw, 0, DV_CHR, - UID_ROOT, GID_KMEM, 0640, "mem"); - kmem_devfs_token = - devfs_add_devswf(&mem_cdevsw, 1, DV_CHR, - UID_ROOT, GID_KMEM, 0640, "kmem"); - null_devfs_token = - devfs_add_devswf(&mem_cdevsw, 2, DV_CHR, - UID_ROOT, GID_WHEEL, 0666, "null"); - random_devfs_token = - devfs_add_devswf(&mem_cdevsw, 3, DV_CHR, - UID_ROOT, GID_WHEEL, 0644, "random"); - urandom_devfs_token = - devfs_add_devswf(&mem_cdevsw, 4, DV_CHR, - UID_ROOT, GID_WHEEL, 0644, "urandom"); - zero_devfs_token = - devfs_add_devswf(&mem_cdevsw, 12, DV_CHR, - UID_ROOT, GID_WHEEL, 0666, "zero"); - io_devfs_token = - devfs_add_devswf(&mem_cdevsw, 14, DV_CHR, - UID_ROOT, GID_WHEEL, 0600, "io"); -#ifdef PERFMON - perfmon_devfs_token = - devfs_add_devswf(&mem_cdevsw, 32, DV_CHR, - UID_ROOT, GID_KMEM, 0640, "perfmon"); -#endif /* PERFMON */ -} -#endif /* DEVFS */ static int mmclose(dev, flags, fmt, p) @@ -661,10 +612,6 @@ iszerodev(dev) && minor(dev) == 12); } - - -static int mem_devsw_installed; - static void mem_drvinit(void *unused) { @@ -673,14 +620,16 @@ mem_drvinit(void *unused) if (mem_range_softc.mr_op != NULL) mem_range_softc.mr_op->init(&mem_range_softc); - /* device registration */ - if( ! mem_devsw_installed ) { - cdevsw_add(&mem_cdevsw); - mem_devsw_installed = 1; -#ifdef DEVFS - memdevfs_init(); -#endif - } + make_dev(&mem_cdevsw, 0, UID_ROOT, GID_KMEM, 0640, "mem"); + make_dev(&mem_cdevsw, 1, UID_ROOT, GID_KMEM, 0640, "kmem"); + make_dev(&mem_cdevsw, 2, UID_ROOT, GID_WHEEL, 0666, "null"); + make_dev(&mem_cdevsw, 3, UID_ROOT, GID_WHEEL, 0644, "random"); + make_dev(&mem_cdevsw, 4, UID_ROOT, GID_WHEEL, 0644, "urandom"); + make_dev(&mem_cdevsw, 12, UID_ROOT, GID_WHEEL, 0666, "zero"); + make_dev(&mem_cdevsw, 14, UID_ROOT, GID_WHEEL, 0600, "io"); +#ifdef PERFMON + make_dev(&mem_cdevsw, 32, UID_ROOT, GID_KMEM, 0640, "perfmon"); +#endif /* PERFMON */ } SYSINIT(memdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,mem_drvinit,NULL) diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 700271a..dce5783 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * $Id: asc.c,v 1.37 1999/05/30 16:52:07 phk Exp $ + * $Id: asc.c,v 1.38 1999/05/31 11:25:50 phk Exp $ */ #include "asc.h" @@ -48,12 +48,6 @@ #include <sys/kernel.h> #include <sys/poll.h> #include <sys/select.h> - -#include "opt_devfs.h" - -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <sys/uio.h> #include <machine/asc_ioctl.h> @@ -162,12 +156,6 @@ struct asc_unit { struct selinfo selp; int height; /* height, for pnm modes */ size_t bcount; /* bytes to read, for pnm modes */ -#ifdef DEVFS - void *devfs_asc; /* storage for devfs tokens (handles) */ - void *devfs_ascp; - void *devfs_ascd; - void *devfs_ascpd; -#endif }; static struct asc_unit unittab[NASC]; @@ -497,23 +485,15 @@ ascattach(struct isa_device *isdp) scu->selp.si_flags=0; scu->selp.si_pid=(pid_t)0; -#ifdef DEVFS #define ASC_UID 0 #define ASC_GID 13 - scu->devfs_asc = - devfs_add_devswf(&asc_cdevsw, unit<<6, DV_CHR, ASC_UID, - ASC_GID, 0666, "asc%d", unit); - scu->devfs_ascp = - devfs_add_devswf(&asc_cdevsw, ((unit<<6) + FRMT_PBM), DV_CHR, - ASC_UID, ASC_GID, 0666, "asc%dp", unit); - scu->devfs_ascd = - devfs_add_devswf(&asc_cdevsw, ((unit<<6) + DBUG_MASK), DV_CHR, - ASC_UID, ASC_GID, 0666, "asc%dd", unit); - scu->devfs_ascpd = - devfs_add_devswf(&asc_cdevsw, ((unit<<6) + DBUG_MASK+FRMT_PBM), - DV_CHR, ASC_UID, ASC_GID, 0666, "asc%dpd", - unit); -#endif /*DEVFS*/ + make_dev(&asc_cdevsw, unit<<6, ASC_UID, ASC_GID, 0666, "asc%d", unit); + make_dev(&asc_cdevsw, ((unit<<6) + FRMT_PBM), + ASC_UID, ASC_GID, 0666, "asc%dp", unit); + make_dev(&asc_cdevsw, ((unit<<6) + DBUG_MASK), + ASC_UID, ASC_GID, 0666, "asc%dd", unit); + make_dev(&asc_cdevsw, ((unit<<6) + DBUG_MASK+FRMT_PBM), + ASC_UID, ASC_GID, 0666, "asc%dpd", unit); return ATTACH_SUCCESS; } diff --git a/sys/i386/isa/atapi-cd.c b/sys/i386/isa/atapi-cd.c index 0613e7e..865f82b 100644 --- a/sys/i386/isa/atapi-cd.c +++ b/sys/i386/isa/atapi-cd.c @@ -25,12 +25,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.c,v 1.19 1999/05/30 16:52:08 phk Exp $ + * $Id: atapi-cd.c,v 1.20 1999/05/31 11:25:51 phk Exp $ */ #include "wdc.h" #include "wcd.h" -#include "opt_devfs.h" #if NWCD > 0 && NWDC > 0 @@ -47,9 +46,6 @@ #include <sys/fcntl.h> #include <sys/conf.h> #include <sys/stat.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif #include <i386/isa/atapi.h> #include <i386/isa/atapi-cd.h> @@ -144,24 +140,14 @@ acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun, } else ptr->device_stats = device_stats; -#ifdef DEVFS - ptr->ra_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rwcd%da", lun); - ptr->rc_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rwcd%dc", lun); - ptr->a_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "wcd%da", lun); - ptr->c_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "wcd%dc", lun); -#endif + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "rwcd%da", lun); + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "rwcd%dc", lun); + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "wcd%da", lun); + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "wcd%dc", lun); return ptr; } diff --git a/sys/i386/isa/atapi-cd.h b/sys/i386/isa/atapi-cd.h index 86ab345..5bde4b7 100644 --- a/sys/i386/isa/atapi-cd.h +++ b/sys/i386/isa/atapi-cd.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.h,v 1.2 1998/10/15 08:11:55 sos Exp $ + * $Id: atapi-cd.h,v 1.3 1999/01/31 21:51:03 sos Exp $ */ /* @@ -346,12 +346,6 @@ struct acd { u_char speed; /* Select drive speed */ u_int next_writeable_lba; /* Next writable position */ struct wormio_prepare_track preptrack; /* Scratch region */ -#ifdef DEVFS - void *ra_devfs_token; - void *rc_devfs_token; - void *a_devfs_token; - void *c_devfs_token; -#endif }; #define CDRIOCBLANK _IO('c',100) /* Blank a CDRW disc */ diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index 0fc5f1e..d3bda19 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -8,7 +8,7 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id: ctx.c,v 1.31 1999/05/30 16:52:09 phk Exp $ + * $Id: ctx.c,v 1.32 1999/05/31 11:25:54 phk Exp $ */ /* @@ -111,18 +111,12 @@ #include "ctx.h" #if NCTX > 0 -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> #include <sys/uio.h> #include <sys/kernel.h> #include <sys/malloc.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ - #include <i386/isa/isa_device.h> #include <i386/isa/ctxreg.h> #include <machine/ioctl_ctx.h> @@ -184,7 +178,6 @@ static struct ctx_soft_registers { int iobase; caddr_t maddr; int msize; - void *devfs_token; } ctx_sr[NCTX]; @@ -216,11 +209,7 @@ ctxattach(struct isa_device * devp) sr->iobase = devp->id_iobase; sr->maddr = devp->id_maddr; sr->msize = devp->id_msize; -#ifdef DEVFS - sr->devfs_token = - devfs_add_devswf(&ctx_cdevsw, 0, DV_CHR, 0, 0, 0600, - "ctx%d", devp->id_unit); -#endif /* DEVFS */ + make_dev(&ctx_cdevsw, 0, 0, 0, 0600, "ctx%d", devp->id_unit); return (1); } diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 48ecb9f..56b0bbc 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -27,12 +27,10 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.90 1999/05/31 11:25:57 phk Exp $ + * $Id: cy.c,v 1.91 1999/06/04 18:13:25 bde Exp $ */ #include "opt_compat.h" -#include "opt_devfs.h" - #include "cy.h" /* @@ -80,10 +78,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/syslog.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif - #include <machine/clock.h> #include <machine/ipl.h> #ifndef SMP @@ -325,14 +319,6 @@ struct com_s { */ u_char obuf1[256]; u_char obuf2[256]; -#ifdef DEVFS - void *devfs_token_ttyd; - void *devfs_token_ttyl; - void *devfs_token_ttyi; - void *devfs_token_cuaa; - void *devfs_token_cual; - void *devfs_token_cuai; -#endif }; /* PCI driver entry point. */ @@ -636,32 +622,24 @@ cyattach_common(cy_iobase, cy_align) register_swi(SWI_TTY, siopoll); sio_registered = TRUE; } -#ifdef DEVFS - com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw, - unit, DV_CHR, + make_dev(&sio_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, "ttyc%r%r", adapter, unit % CY_MAX_PORTS); - com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw, - unit | CONTROL_INIT_STATE, DV_CHR, + make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE, UID_ROOT, GID_WHEEL, 0600, "ttyic%r%r", adapter, unit % CY_MAX_PORTS); - com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw, - unit | CONTROL_LOCK_STATE, DV_CHR, + make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE, UID_ROOT, GID_WHEEL, 0600, "ttylc%r%r", adapter, unit % CY_MAX_PORTS); - com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw, - unit | CALLOUT_MASK, DV_CHR, + make_dev(&sio_cdevsw, unit | CALLOUT_MASK, UID_UUCP, GID_DIALER, 0660, "cuac%r%r", adapter, unit % CY_MAX_PORTS); - com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw, - unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR, + make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE, UID_UUCP, GID_DIALER, 0660, "cuaic%r%r", adapter, unit % CY_MAX_PORTS); - com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw, - unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR, + make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE, UID_UUCP, GID_DIALER, 0660, "cualc%r%r", adapter, unit % CY_MAX_PORTS); -#endif } } diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index 1aff398..a809a2e 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -24,18 +24,12 @@ #if NGP > 0 -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> #include <sys/uio.h> #include <sys/kernel.h> #include <sys/malloc.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ - #include <i386/isa/gpibreg.h> #include <i386/isa/gpib.h> #include <i386/isa/isa_device.h> @@ -110,9 +104,6 @@ static struct gpib_softc { u_char sc_flags; /* flags (open and internal) */ char sc_unit; /* gpib device number */ char *sc_inbuf; /* buffer for data */ -#ifdef DEVFS - void *devfs_token; /* handle for devfs entry */ -#endif } gpib_sc; /* only support one of these? */ static int oldcount; static char oldbytes[2]; @@ -158,10 +149,7 @@ gpattach(isdp) printf ("gp%d: type AT-GPIB chip NAT4882A\n",sc->sc_unit); sc->sc_flags |=ATTACHED; -#ifdef DEVFS - sc->devfs_token = - devfs_add_devswf(&gp_cdevsw, 0, DV_CHR, 0, 0, 0600, "gp"); -#endif + make_dev(&gp_cdevsw, 0, 0, 0, 0600, "gp"); return (1); } diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index 48bd5f2..b7f429a 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -34,18 +34,12 @@ #include "gsc.h" #if NGSC > 0 - -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> #include <sys/buf.h> #include <sys/malloc.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <sys/uio.h> #include <machine/gsc.h> @@ -159,12 +153,6 @@ struct gsc_unit { int height; /* height, for pnm modes */ size_t bcount; /* bytes to read, for pnm modes */ struct _sbuf hbuf; /* buffer for pnm header data */ -#ifdef DEVFS - void *devfs_gsc; /* storage for devfs tokens (handles) */ - void *devfs_gscp; - void *devfs_gscd; - void *devfs_gscpd; -#endif }; static struct gsc_unit unittab[NGSC]; @@ -546,23 +534,15 @@ gscattach(struct isa_device *isdp) scu->flags |= ATTACHED; lprintf(("gsc%d.attach: ok\n", unit)); scu->flags &= ~FLAG_DEBUG; -#ifdef DEVFS #define GSC_UID 0 #define GSC_GID 13 - scu->devfs_gsc = - devfs_add_devswf(&gsc_cdevsw, unit<<6, DV_CHR, GSC_UID, GSC_GID, - 0666, "gsc%d", unit); - scu->devfs_gscp = - devfs_add_devswf(&gsc_cdevsw, ((unit<<6) + FRMT_PBM), DV_CHR, - GSC_UID, GSC_GID, 0666, "gsc%dp", unit); - scu->devfs_gscd = - devfs_add_devswf(&gsc_cdevsw, ((unit<<6) + DBUG_MASK), DV_CHR, - GSC_UID, GSC_GID, 0666, "gsc%dd", unit); - scu->devfs_gscpd = - devfs_add_devswf(&gsc_cdevsw, ((unit<<6) + DBUG_MASK+FRMT_PBM), - DV_CHR, GSC_UID, GSC_GID, 0666, "gsc%dpd", - unit); -#endif /*DEVFS*/ + make_dev(&gsc_cdevsw, unit<<6, GSC_UID, GSC_GID, 0666, "gsc%d", unit); + make_dev(&gsc_cdevsw, ((unit<<6) + FRMT_PBM), + GSC_UID, GSC_GID, 0666, "gsc%dp", unit); + make_dev(&gsc_cdevsw, ((unit<<6) + DBUG_MASK), + GSC_UID, GSC_GID, 0666, "gsc%dd", unit); + make_dev(&gsc_cdevsw, ((unit<<6) + DBUG_MASK+FRMT_PBM), + GSC_UID, GSC_GID, 0666, "gsc%dpd", unit); return ATTACH_SUCCESS; } diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c index 260a1c2..e29fb51 100644 --- a/sys/i386/isa/if_cx.c +++ b/sys/i386/isa/if_cx.c @@ -20,8 +20,6 @@ #include "cx.h" #include "bpf.h" -#include "opt_devfs.h" - #include "sppp.h" #if NSPPP <= 0 #error The device 'cx' requires sppp. @@ -43,10 +41,6 @@ #endif #include <i386/isa/isa_device.h> -#ifdef DEVFS -extern struct cdevsw cx_cdevsw; -#include <sys/devfsext.h> -#endif /*DEVFS*/ #define watchdog_func_t void(*)(struct ifnet *) #define start_func_t void(*)(struct ifnet*) @@ -216,10 +210,6 @@ cxprobe (struct isa_device *id) * The adapter is present, initialize the driver structures. */ -#ifdef DEVFS -static void *cx_devfs_token; -#endif - static int cxattach (struct isa_device *id) { @@ -300,10 +290,11 @@ cxattach (struct isa_device *id) timeout (cxtimeout, 0, hz*5); printf ("cx%d: <Cronyx-%s>\n", unit, b->name); -#ifdef DEVFS - cx_devfs_token = - devfs_add_devswf(&cx_cdevsw, 0, DV_CHR, 0, 0, 0600, "cx"); -#endif + { + extern struct cdevsw cx_cdevsw; + + make_dev(&cx_cdevsw, 0, 0, 0, 0600, "cx"); + } return (1); } diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c index a2edbd5..56c90d1 100644 --- a/sys/i386/isa/joy.c +++ b/sys/i386/isa/joy.c @@ -29,16 +29,10 @@ #include "joy.h" #if NJOY > 0 - -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <sys/uio.h> #include <machine/clock.h> @@ -75,9 +69,6 @@ static struct { int port; int x_off[2], y_off[2]; int timeout[2]; -#ifdef DEVFS - void *devfs_token; -#endif } joy[NJOY]; @@ -141,11 +132,7 @@ joyattach (struct isa_device *dev) joy[unit].port = dev->id_iobase; joy[unit].timeout[0] = joy[unit].timeout[1] = 0; printf("joy%d: joystick\n", unit); -#ifdef DEVFS - joy[dev->id_unit].devfs_token = - devfs_add_devswf(&joy_cdevsw, 0, DV_CHR, 0, 0, - 0600, "joy%d", unit); -#endif + make_dev(&joy_cdevsw, 0, 0, 0, 0600, "joy%d", unit); return 1; } diff --git a/sys/i386/isa/labpc.c b/sys/i386/isa/labpc.c index d1b9798..a19b86a 100644 --- a/sys/i386/isa/labpc.c +++ b/sys/i386/isa/labpc.c @@ -41,8 +41,6 @@ #include "labpc.h" #include "opt_debug_outb.h" -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> @@ -53,9 +51,6 @@ #define b_actf b_act.tqe_next #include <sys/dataacq.h> #include <sys/conf.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #ifdef LOUTB #include <machine/clock.h> @@ -151,9 +146,6 @@ struct ctlr /* Device configuration structure: */ -#ifdef DEVFS - void *devfs_token; -#endif }; #ifdef LOUTB @@ -503,13 +495,7 @@ labpcattach(struct isa_device *dev) ctlr->dcr_is = 0x80; loutb(DCR(ctlr), ctlr->dcr_val); -#ifdef DEVFS - ctlr->devfs_token = - devfs_add_devswf(&labpc_cdevsw, 0, DV_CHR, - /* what UID GID PERM */ - 0, 0, 0600, - "labpc%d", dev->id_unit); -#endif + make_dev(&labpc_cdevsw, 0, 0, 0, 0600, "labpc%d", dev->id_unit); return 1; } diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c index 9ffd002..4705d15 100644 --- a/sys/i386/isa/matcd/matcd.c +++ b/sys/i386/isa/matcd/matcd.c @@ -337,14 +337,13 @@ static char MATCDVERSION[]="Version 1(26) 18-Oct-95"; static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank Durda IV"; /* The proceeding strings may not be changed*/ -/* $Id: matcd.c,v 1.41 1999/05/31 11:26:55 phk Exp $ */ +/* $Id: matcd.c,v 1.42 1999/07/03 21:02:09 peter Exp $ */ /*--------------------------------------------------------------------------- Include declarations ---------------------------------------------------------------------------*/ #include "matcd.h" -#include "opt_devfs.h" #include <sys/param.h> #include <sys/systm.h> @@ -362,9 +361,6 @@ static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank #include <sys/conf.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <i386/isa/isa_device.h> @@ -428,16 +424,6 @@ static struct matcd_data { struct matcd_mbx mbx; u_char patch[2]; /*<12>Last known audio routing*/ u_char volume[2]; /*<12>Last known volume setting*/ -#ifdef DEVFS - void *ra_devfs_token; /* handle for devfs entry */ - void *rc_devfs_token; - void *a_devfs_token; - void *c_devfs_token; - void *rla_devfs_token; - void *rlc_devfs_token; - void *la_devfs_token; - void *lc_devfs_token; -#endif /* DEVFS */ } matcd_data[TOTALDRIVES]; @@ -1414,32 +1400,15 @@ matcd_attach(struct isa_device *dev) for (i=0; i<MAXPARTITIONS; i++) { cd->partflags[i]=0; } -#ifdef DEVFS - cd->ra_devfs_token = devfs_add_devswf(&matcd_cdevsw, - dkmakeminor(i, 0, 0), DV_CHR, + make_dev(&matcd_cdevsw, dkmakeminor(i, 0, 0), UID_ROOT, GID_OPERATOR, 0640, "rmatcd%da", i); - cd->rc_devfs_token = devfs_add_devswf(&matcd_cdevsw, - dkmakeminor(i, 0, RAW_PART), DV_CHR, + make_dev(&matcd_cdevsw, dkmakeminor(i, 0, RAW_PART), UID_ROOT, GID_OPERATOR, 0640, "rmatcd%dc", i); - cd->a_devfs_token = devfs_add_devswf(&matcd_cdevsw, - dkmakeminor(i, 0, 0), DV_BLK, - UID_ROOT, GID_OPERATOR, 0640, "matcd%da", i); - cd->c_devfs_token = devfs_add_devswf(&matcd_cdevsw, - dkmakeminor(i, 0, RAW_PART), DV_BLK, - UID_ROOT, GID_OPERATOR, 0640, "matcd%dc", i); - cd->rla_devfs_token = devfs_add_devswf(&matcd_cdevsw, - 0x80 | dkmakeminor(i, 0, 0), DV_CHR, + make_dev(&matcd_cdevsw, 0x80 | dkmakeminor(i, 0, 0), UID_ROOT, GID_OPERATOR, 0640, "rmatcd%dla", i); - cd->rlc_devfs_token = devfs_add_devswf(&matcd_cdevsw, - 0x80 | dkmakeminor(i, 0, RAW_PART), DV_CHR, + make_dev(&matcd_cdevsw, + 0x80 | dkmakeminor(i, 0, RAW_PART), UID_ROOT, GID_OPERATOR, 0640, "rmatcd%dc", i); - cd->la_devfs_token = devfs_add_devswf(&matcd_cdevsw, - 0x80 | dkmakeminor(i, 0, 0), DV_BLK, - UID_ROOT, GID_OPERATOR, 0640, "matcd%dla", i); - cd->lc_devfs_token = devfs_add_devswf(&matcd_cdevsw, - 0x80 | dkmakeminor(i, 0, RAW_PART), DV_BLK, - UID_ROOT, GID_OPERATOR, 0640, "matcd%dlc", i); -#endif } } nextcontroller++; /*Bump ctlr assign to next number*/ diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index 17e9b0c..0f50017 100644 --- a/sys/i386/isa/mcd.c +++ b/sys/i386/isa/mcd.c @@ -40,14 +40,12 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.107 1999/05/30 16:52:19 phk Exp $ + * $Id: mcd.c,v 1.108 1999/05/31 11:26:15 phk Exp $ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #include "mcd.h" #if NMCD > 0 -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> @@ -57,9 +55,6 @@ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #include <sys/dkbad.h> #include <sys/disklabel.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/clock.h> @@ -150,12 +145,6 @@ static struct mcd_data { short debug; struct buf_queue_head head; /* head of buf queue */ struct mcd_mbx mbx; -#ifdef DEVFS - void *ra_devfs_token; /* store the devfs handle here */ - void *rc_devfs_token; /* store the devfs handle here */ - void *a_devfs_token; /* store the devfs handle here */ - void *c_devfs_token; /* store the devfs handle here */ -#endif } mcd_data[NMCD]; /* reader state machine */ @@ -275,24 +264,14 @@ int mcd_attach(struct isa_device *dev) mcd_configure(cd); #endif /* name filled in probe */ -#ifdef DEVFS - cd->ra_devfs_token = - devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rmcd%da", unit); - cd->rc_devfs_token = - devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rmcd%dc", unit); - cd->a_devfs_token = - devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "mcd%da", unit); - cd->c_devfs_token = - devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "mcd%dc", unit); -#endif + make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "rmcd%da", unit); + make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "rmcd%dc", unit); + make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "mcd%da", unit); + make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "mcd%dc", unit); return 1; } diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index a8676bc..ddc41a8 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.43 1999/05/30 16:52:20 phk Exp $ + * $Id: mse.c,v 1.44 1999/05/31 11:26:17 phk Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -46,8 +46,6 @@ #include "mse.h" #if NMSE > 0 -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> @@ -55,9 +53,6 @@ #include <sys/poll.h> #include <sys/select.h> #include <sys/uio.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/clock.h> #include <machine/mouse.h> @@ -127,10 +122,6 @@ static struct mse_softc { mousehw_t hw; mousemode_t mode; mousestatus_t status; -#ifdef DEVFS - void *devfs_token; - void *n_devfs_token; -#endif } mse_sc[NMSE]; /* Flags */ @@ -281,14 +272,8 @@ mseattach(idp) idp->id_ointr = mseintr; sc->sc_port = idp->id_iobase; sc->mode.accelfactor = (idp->id_flags & MSE_CONFIG_ACCEL) >> 4; -#ifdef DEVFS - sc->devfs_token = - devfs_add_devswf(&mse_cdevsw, unit << 1, DV_CHR, 0, 0, - 0600, "mse%d", unit); - sc->n_devfs_token = - devfs_add_devswf(&mse_cdevsw, (unit<<1)+1, DV_CHR,0, 0, - 0600, "nmse%d", unit); -#endif + make_dev(&mse_cdevsw, unit << 1, 0, 0, 0600, "mse%d", unit); + make_dev(&mse_cdevsw, (unit<<1)+1, 0, 0, 0600, "nmse%d", unit); return (1); } diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c index 8ed04da..cdf3b35 100644 --- a/sys/i386/isa/pcaudio.c +++ b/sys/i386/isa/pcaudio.c @@ -25,13 +25,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcaudio.c,v 1.49 1999/05/30 16:52:21 phk Exp $ + * $Id: pcaudio.c,v 1.50 1999/05/31 11:26:19 phk Exp $ */ #include "pca.h" #if NPCA > 0 -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> @@ -48,10 +46,6 @@ #include <i386/isa/isa_device.h> #include <i386/isa/timerreg.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ - #define BUF_SIZE 8192 #define SAMPLE_RATE 8000 #define INTERRUPT_RATE 16000 @@ -118,11 +112,6 @@ static unsigned char alaw_linear[] = { 76, 181, 125, 130, 0, 255, 115, 141, }; -#ifdef DEVFS -static void *pca_devfs_token; -static void *pcac_devfs_token; -#endif - static int pca_sleep = 0; static int pca_initialized = 0; @@ -329,13 +318,8 @@ pcaattach(struct isa_device *dvp) { printf("pca%d: PC speaker audio driver\n", dvp->id_unit); pca_init(); -#ifdef DEVFS - pca_devfs_token = - devfs_add_devswf(&pca_cdevsw, 0, DV_CHR, 0, 0, 0600, "pcaudio"); - pcac_devfs_token = - devfs_add_devswf(&pca_cdevsw, 128, DV_CHR, 0, 0, 0600, - "pcaudioctl"); -#endif /*DEVFS*/ + make_dev(&pca_cdevsw, 0, 0, 0, 0600, "pcaudio"); + make_dev(&pca_cdevsw, 128, 0, 0, 0600, "pcaudioctl"); return 1; } diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index c4e9f94..4f0bfd6 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -79,18 +79,9 @@ #include "vt.h" #if NVT > 0 -#include "opt_devfs.h" - #define EXTERN /* allocate mem */ #include <i386/isa/pcvt/pcvt_hdr.h> /* global include */ -#ifdef DEVFS -#include <sys/devfsext.h> -#if !defined(MAXCONS) -#define MAXCONS 16 -#endif -static void *pcvt_devfs_token[MAXCONS]; -#endif /*DEVFS*/ #if PCVT_FREEBSD >= 200 #include <sys/bus.h> @@ -220,9 +211,6 @@ pcattach(struct isa_device *dev) { #endif /* PCVT_NETBSD > 9 */ -#ifdef DEVFS - int vt; -#endif /*DEVFS*/ int i; vt_coldmalloc(); /* allocate memory for screens */ @@ -389,14 +377,6 @@ pcattach(struct isa_device *dev) #if PCVT_FREEBSD > 205 cdevsw_add(&pc_cdevsw); - -#ifdef DEVFS - for(vt = 0; vt < MAXCONS; vt++) { - pcvt_devfs_token[vt] = - devfs_add_devswf(&pc_cdevsw, vt, - DV_CHR, 0, 0, 0600, "ttyv%r", vt ); - } -#endif DEVFS #endif /* PCVT_FREEBSD > 205 */ #if PCVT_NETBSD > 9 diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c index 78b94f2..78dd5f5 100644 --- a/sys/i386/isa/rc.c +++ b/sys/i386/isa/rc.c @@ -33,8 +33,6 @@ #include "rc.h" #if NRC > 0 -#include "opt_devfs.h" - /*#define RCDEBUG*/ #include <sys/param.h> @@ -46,10 +44,6 @@ #include <sys/fcntl.h> #include <sys/interrupt.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ - #include <machine/clock.h> #include <machine/ipl.h> @@ -148,9 +142,6 @@ static struct rc_chans { u_char *rc_obufend; /* end of output buf */ u_char rc_ibuf[4 * RC_IBUFSIZE]; /* input buffer */ u_char rc_obuf[RC_OBUFSIZE]; /* output buffer */ -#ifdef DEVFS - void *devfs_token; -#endif } rc_chans[NRC * CD180_NCHAN]; static int rc_scheduled_event = 0; @@ -274,14 +265,6 @@ rcattach(dvp) tp->t_lflag = tp->t_iflag = tp->t_oflag = 0; tp->t_cflag = TTYDEF_CFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; -#ifdef DEVFS -/* FIX THIS to reflect real devices */ - rc->devfs_token = - devfs_add_devswf(&rc_cdevsw, - (dvp->id_unit * CD180_NCHAN) + chan, - DV_CHR, 0, 0, 0600, "rc%d.%d", - dvp->id_unit, chan); -#endif } rcb->rcb_probed = RC_ATTACHED; if (!rc_started) { diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c index c1913a0..b16f6e4 100644 --- a/sys/i386/isa/rp.c +++ b/sys/i386/isa/rp.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: rp.c,v 1.27 1999/05/30 16:52:22 phk Exp $ + * $Id: rp.c,v 1.28 1999/05/31 11:26:24 phk Exp $ */ /* @@ -1178,13 +1178,6 @@ rp_pciattach(pcici_t tag, int unit) rp->rp_cts = (ChanStatus & CTS_ACT) != 0; line = (unit << 5) | (aiop << 3) | chan; rp_table(line) = rp; -/* devfs_add_devswf(&rp_cdevsw, - port, DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttyR%r", port); - devfs_add_devswf(&rp_cdevsw, - port | CONTROL_INIT_STATE, DV_CHR, UID_ROOT, - GID_WHEEL, 0600, "ttyRi%r", port); -*/ } } } diff --git a/sys/i386/isa/scd.c b/sys/i386/isa/scd.c index ff4832d..a9e39f1 100644 --- a/sys/i386/isa/scd.c +++ b/sys/i386/isa/scd.c @@ -41,7 +41,7 @@ */ -/* $Id: scd.c,v 1.46 1999/05/30 16:52:24 phk Exp $ */ +/* $Id: scd.c,v 1.47 1999/05/31 11:26:26 phk Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -49,7 +49,6 @@ #include "scd.h" #if NSCD > 0 -#include "opt_devfs.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> @@ -58,9 +57,6 @@ #include <sys/dkbad.h> #include <sys/disklabel.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/clock.h> #include <machine/stdarg.h> @@ -136,12 +132,6 @@ static struct scd_data { short audio_status; struct buf_queue_head head; /* head of buf queue */ struct scd_mbx mbx; -#ifdef DEVFS - void *ra_devfs_token; - void *rc_devfs_token; - void *a_devfs_token; - void *c_devfs_token; -#endif } scd_data[NSCD]; /* prototypes */ @@ -232,24 +222,14 @@ scd_attach(struct isa_device *dev) cd->audio_status = CD_AS_AUDIO_INVALID; bufq_init(&cd->head); -#ifdef DEVFS - cd->ra_devfs_token = - devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, 0), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rscd%da", unit); - cd->rc_devfs_token = - devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rscd%dc", unit); - cd->a_devfs_token = - devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, 0), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "scd%da", unit); - cd->c_devfs_token = - devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "scd%dc", unit); -#endif + make_dev(&scd_cdevsw, dkmakeminor(unit, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "rscd%da", unit); + make_dev(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "rscd%dc", unit); + make_dev(&scd_cdevsw, dkmakeminor(unit, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "scd%da", unit); + make_dev(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "scd%dc", unit); return 1; } diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c index 5ec570a..c2f3b98 100644 --- a/sys/i386/isa/si.c +++ b/sys/i386/isa/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.87 1999/05/31 11:26:28 phk Exp $ + * $Id: si.c,v 1.88 1999/08/18 17:42:41 nsayer Exp $ */ #ifndef lint @@ -41,7 +41,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International #include "opt_compat.h" #include "opt_debug_si.h" -#include "opt_devfs.h" #include <sys/param.h> #include <sys/systm.h> @@ -56,9 +55,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/sysctl.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/clock.h> @@ -249,17 +245,6 @@ struct si_softc { int sc_eisa_iobase; /* EISA io port address */ int sc_eisa_irq; /* EISA irq number */ #endif -#ifdef DEVFS - struct { - void *ttya; - void *cuaa; - void *ttyl; - void *cual; - void *ttyi; - void *cuai; - } devfs_token[32]; /* what is the max per card? */ - void *control_token; -#endif }; static struct si_softc si_softc[NSI]; /* up to 4 elements */ @@ -1100,34 +1085,18 @@ try_next2: done_chartimes = 1; } -#ifdef DEVFS /* path name devsw minor type uid gid perm*/ for ( x = 0; x < sc->sc_nport; x++ ) { /* sync with the manuals that start at 1 */ y = x + 1 + id->id_unit * (1 << SI_CARDSHIFT); - sc->devfs_token[x].ttya = devfs_add_devswf( - &si_cdevsw, x, - DV_CHR, 0, 0, 0600, "ttyA%02d", y); - sc->devfs_token[x].cuaa = devfs_add_devswf( - &si_cdevsw, x + 0x00080, - DV_CHR, 0, 0, 0600, "cuaA%02d", y); - sc->devfs_token[x].ttyi = devfs_add_devswf( - &si_cdevsw, x + 0x10000, - DV_CHR, 0, 0, 0600, "ttyiA%02d", y); - sc->devfs_token[x].cuai = devfs_add_devswf( - &si_cdevsw, x + 0x10080, - DV_CHR, 0, 0, 0600, "cuaiA%02d", y); - sc->devfs_token[x].ttyl = devfs_add_devswf( - &si_cdevsw, x + 0x20000, - DV_CHR, 0, 0, 0600, "ttylA%02d", y); - sc->devfs_token[x].cual = devfs_add_devswf( - &si_cdevsw, x + 0x20080, - DV_CHR, 0, 0, 0600, "cualA%02d", y); - } - sc->control_token = - devfs_add_devswf(&si_cdevsw, 0x40000, DV_CHR, 0, 0, 0600, - "si_control"); -#endif + make_dev( &si_cdevsw, x, 0, 0, 0600, "ttyA%02d", y); + make_dev( &si_cdevsw, x + 0x00080, 0, 0, 0600, "cuaA%02d", y); + make_dev( &si_cdevsw, x + 0x10000, 0, 0, 0600, "ttyiA%02d", y); + make_dev( &si_cdevsw, x + 0x10080, 0, 0, 0600, "cuaiA%02d", y); + make_dev( &si_cdevsw, x + 0x20000, 0, 0, 0600, "ttylA%02d", y); + make_dev( &si_cdevsw, x + 0x20080, 0, 0, 0600, "cualA%02d", y); + } + make_dev(&si_cdevsw, 0x40000, 0, 0, 0600, "si_control"); return (1); } diff --git a/sys/i386/isa/snd/sound.c b/sys/i386/isa/snd/sound.c index 6737ee5..4e2062f 100644 --- a/sys/i386/isa/snd/sound.c +++ b/sys/i386/isa/snd/sound.c @@ -50,12 +50,7 @@ * */ -#include "opt_devfs.h" - #include <i386/isa/snd/sound.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ #if NPCM > 0 /* from "pcm.h" via disgusting #include in snd/sound.h */ @@ -337,10 +332,6 @@ pcmattach(struct isa_device * dev) int pcminit(snddev_info *d, int unit) { -#ifdef DEVFS - void *cookie; -#endif - cdevsw_add(&snd_cdevsw); /* @@ -354,7 +345,6 @@ pcminit(snddev_info *d, int unit) d->play_blocksize = d->rec_blocksize = 2048 ; d->play_fmt = d->rec_fmt = AFMT_MU_LAW ; -#ifdef DEVFS #ifndef GID_GAMES #define GID_SND UID_ROOT #else @@ -363,42 +353,20 @@ pcminit(snddev_info *d, int unit) #define UID_SND UID_ROOT #define PERM_SND 0660 /* - * XXX remember to store the returned tokens if you want to - * be able to remove the device later - * * Make links to first successfully probed unit. * Attempts by later devices to make these links will fail. */ - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_DSP, - DV_CHR, UID_SND, GID_SND, PERM_SND, "dsp%r", unit); - if (cookie) devfs_makelink(cookie, "dsp"); - - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_DSP16, - DV_CHR, UID_SND, GID_SND, PERM_SND, "dspW%r", unit); - if (cookie) devfs_makelink(cookie, "dspW"); - - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_AUDIO, - DV_CHR, UID_SND, GID_SND, PERM_SND, "audio%r", unit); - if (cookie) devfs_makelink(cookie, "audio"); - - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_CTL, - DV_CHR, UID_SND, GID_SND, PERM_SND, "mixer%r", unit); - if (cookie) devfs_makelink(cookie, "mixer"); - - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_STATUS, - DV_CHR, UID_SND, GID_SND, PERM_SND, "sndstat%r", unit); - if (cookie) devfs_makelink(cookie, "sndstat"); - -#if 0 /* these two are still unsupported... */ - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_MIDIN, - DV_CHR, UID_SND, GID_SND, PERM_SND, "midi%r", unit); - if (cookie) devfs_makelink(cookie, "midi"); - - cookie = devfs_add_devswf(&snd_cdevsw, (unit << 4) | SND_DEV_SYNTH, - DV_CHR, UID_SND, GID_SND, PERM_SND, "sequencer%r", unit); - if (cookie) devfs_makelink(cookie, "sequencer"); -#endif -#endif /* DEVFS */ + make_dev(&snd_cdevsw, (unit << 4) | SND_DEV_DSP, + UID_SND, GID_SND, PERM_SND, "dsp%r", unit); + make_dev(&snd_cdevsw, (unit << 4) | SND_DEV_DSP16, + UID_SND, GID_SND, PERM_SND, "dspW%r", unit); + make_dev(&snd_cdevsw, (unit << 4) | SND_DEV_AUDIO, + UID_SND, GID_SND, PERM_SND, "audio%r", unit); + make_dev(&snd_cdevsw, (unit << 4) | SND_DEV_CTL, + UID_SND, GID_SND, PERM_SND, "mixer%r", unit); + make_dev(&snd_cdevsw, (unit << 4) | SND_DEV_STATUS, + UID_SND, GID_SND, PERM_SND, "sndstat%r", unit); + #if NAPM > 0 init_sound_apm(unit); #endif diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index 0c97f90..746ea9b 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -26,13 +26,7 @@ * SUCH DAMAGE. * */ -#include "opt_devfs.h" - #include <i386/isa/sound/sound_config.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ - #if NSND > 0 /* from "snd.h" */ #include "uart.h" @@ -508,7 +502,6 @@ sndattach(struct isa_device * dev) } cdevsw_add(&snd_cdevsw); -#ifdef DEVFS #define GID_SND GID_GAMES #define UID_SND UID_ROOT #define PERM_SND 0660 @@ -517,40 +510,25 @@ sndattach(struct isa_device * dev) * duplicate creation of same node failed (ie. bad cookie returned) */ if (dev->id_driver == &opldriver){ - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_SEQ, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "sequencer%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "sequencer"); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_SEQ, + UID_SND, GID_SND, PERM_SND, "sequencer%r", dev->id_unit); } else if (dev->id_driver == &mpudriver || dev->id_driver == &sbmididriver || dev->id_driver == &uartdriver){ - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_MIDIN, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "midi%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "midi"); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_MIDIN, + UID_SND, GID_SND, PERM_SND, "midi%r", dev->id_unit); } else { - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_DSP, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "dsp%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "dsp"); - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_DSP16, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "dspW%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "dspW"); - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_AUDIO, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "audio%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "audio"); - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_CTL, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "mixer%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "mixer"); - tmp = devfs_add_devswf(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_STATUS, - DV_CHR, UID_SND, GID_SND, PERM_SND, - "sndstat%r", dev->id_unit); - if (tmp) devfs_makelink(tmp, "sndstat"); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_DSP, + UID_SND, GID_SND, PERM_SND, "dsp%r", dev->id_unit); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_DSP16, + UID_SND, GID_SND, PERM_SND, "dspW%r", dev->id_unit); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_AUDIO, + UID_SND, GID_SND, PERM_SND, "audio%r", dev->id_unit); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_CTL, + UID_SND, GID_SND, PERM_SND, "mixer%r", dev->id_unit); + make_dev(&snd_cdevsw, (dev->id_unit << 4) | SND_DEV_STATUS, + UID_SND, GID_SND, PERM_SND, "sndstat%r", dev->id_unit); } -#endif /* DEVFS */ return TRUE; } diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index b2ce86d..3b64ff5 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -51,7 +51,6 @@ error "Can only have 1 spigot configured." #endif -#include "opt_devfs.h" #include "opt_spigot.h" #include <sys/param.h> @@ -61,9 +60,6 @@ error "Can only have 1 spigot configured." #include <sys/proc.h> #include <sys/signalvar.h> #include <sys/mman.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ #include <machine/frame.h> #include <machine/md_var.h> @@ -78,9 +74,6 @@ static struct spigot_softc { struct proc *p; u_long signal_num; u_short irq; -#ifdef DEVFS - void *devfs_token; -#endif } spigot_softc[NSPIGOT]; /* flags in softc */ @@ -159,12 +152,7 @@ spigot_attach(struct isa_device *devp) devp->id_ointr = spigintr; ss->maddr = kvtop(devp->id_maddr); ss->irq = devp->id_irq; -#ifdef DEVFS - ss->devfs_token = - devfs_add_devswf(&spigot_cdevsw, unit, DV_CHR, 0, 0, 0644, - "spigot%d", unit); -#endif - + make_dev(&spigot_cdevsw, unit, 0, 0, 0644, "spigot%d", unit); return 1; } diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index b11251f..29f8205 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -4,15 +4,13 @@ * 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.38 1999/08/17 20:25:49 billf Exp $ + * $Id: spkr.c,v 1.39 1999/08/23 20:35:17 bde Exp $ */ #include "speaker.h" #if NSPEAKER > 0 -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -24,11 +22,6 @@ #include <machine/clock.h> #include <machine/speaker.h> -#ifdef DEVFS -#include <sys/devfsext.h> -static void *devfs_token; -#endif - static d_open_t spkropen; static d_close_t spkrclose; static d_write_t spkrwrite; @@ -604,11 +597,7 @@ spkrioctl(dev, cmd, cmdarg, flags, p) static void spkr_drvinit(void *unused) { - cdevsw_add(&spkr_cdevsw); -#ifdef DEVFS - devfs_token = devfs_add_devswf(&spkr_cdevsw, 0, DV_CHR, - UID_ROOT, GID_WHEEL, 0600, "speaker"); -#endif + make_dev(&spkr_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "speaker"); } SYSINIT(spkrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,spkr_drvinit,NULL) diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c index c7de9d3..3556255 100644 --- a/sys/i386/isa/tw.c +++ b/sys/i386/isa/tw.c @@ -32,8 +32,6 @@ #include "tw.h" #if NTW > 0 -#include "opt_devfs.h" - /* * Driver configuration parameters */ @@ -148,10 +146,6 @@ #include <sys/syslog.h> #include <sys/select.h> #include <sys/poll.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ - #define MIN(a,b) ((a)<(b)?(a):(b)) #ifdef HIRESTIME @@ -278,9 +272,6 @@ static struct tw_sc { #define SC_RCV_TIME_LEN 128 int sc_rcv_time[SC_RCV_TIME_LEN]; /* usec time stamp on interrupt */ #endif /* HIRESTIME */ -#ifdef DEVFS - void *devfs_token; /* store the devfs handle */ -#endif } tw_sc[NTW]; static int tw_zcport; /* offset of port for zero crossing signal */ @@ -418,13 +409,7 @@ static int twattach(idp) sc->sc_state = 0; sc->sc_rcount = 0; callout_handle_init(&sc->abortrcv_ch); - -#ifdef DEVFS - sc->devfs_token = - devfs_add_devswf(&tw_cdevsw, unit, DV_CHR, 0, 0, - 0600, "tw%d", unit); -#endif - + make_dev(&tw_cdevsw, unit, 0, 0, 0600, "tw%d", unit); return (1); } diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c index ff3d923..74de282 100644 --- a/sys/i386/isa/wd.c +++ b/sys/i386/isa/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.200 1999/08/09 10:34:52 phk Exp $ + * $Id: wd.c,v 1.201 1999/08/14 11:40:40 phk Exp $ */ /* TODO: @@ -64,7 +64,6 @@ #if NWDC > 0 -#include "opt_devfs.h" #include "opt_hw_wdog.h" #include "opt_ide_delay.h" @@ -80,9 +79,6 @@ #include <sys/devicestat.h> #include <sys/malloc.h> #include <sys/cons.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/bootinfo.h> #include <machine/clock.h> #include <machine/md_var.h> @@ -157,10 +153,6 @@ struct disk { u_char dk_timeout; /* countdown to next timeout */ u_int32_t dk_port; /* i/o port base */ u_int32_t dk_altport; /* altstatus port base */ -#ifdef DEVFS - void *dk_bdev; /* devfs token for whole disk */ - void *dk_cdev; /* devfs token for raw whole disk */ -#endif /* DEVFS */ u_long cfg_flags; /* configured characteristics */ short dk_flags; /* drive characteristics found */ #define DKFL_SINGLE 0x00004 /* sector at a time mode */ @@ -404,9 +396,6 @@ nodevice: static int wdattach(struct isa_device *dvp) { -#if defined(DEVFS) - int mynor; -#endif int unit, lunit, flags, i; struct disk *du; struct wdparams *wp; @@ -521,17 +510,9 @@ wdattach(struct isa_device *dvp) */ wdtimeout(du); -#ifdef DEVFS - mynor = dkmakeminor(lunit, WHOLE_DISK_SLICE, RAW_PART); - du->dk_bdev = devfs_add_devswf(&wd_cdevsw, mynor, - DV_BLK, UID_ROOT, - GID_OPERATOR, 0640, - "wd%d", lunit); - du->dk_cdev = devfs_add_devswf(&wd_cdevsw, mynor, - DV_CHR, UID_ROOT, - GID_OPERATOR, 0640, - "rwd%d", lunit); -#endif + make_dev(&wd_cdevsw, + dkmakeminor(lunit, WHOLE_DISK_SLICE, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "rwd%d", lunit); /* * Export the drive to the devstat interface. diff --git a/sys/i386/isa/wd_cd.c b/sys/i386/isa/wd_cd.c index 0613e7e..865f82b 100644 --- a/sys/i386/isa/wd_cd.c +++ b/sys/i386/isa/wd_cd.c @@ -25,12 +25,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.c,v 1.19 1999/05/30 16:52:08 phk Exp $ + * $Id: atapi-cd.c,v 1.20 1999/05/31 11:25:51 phk Exp $ */ #include "wdc.h" #include "wcd.h" -#include "opt_devfs.h" #if NWCD > 0 && NWDC > 0 @@ -47,9 +46,6 @@ #include <sys/fcntl.h> #include <sys/conf.h> #include <sys/stat.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif #include <i386/isa/atapi.h> #include <i386/isa/atapi-cd.h> @@ -144,24 +140,14 @@ acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun, } else ptr->device_stats = device_stats; -#ifdef DEVFS - ptr->ra_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rwcd%da", lun); - ptr->rc_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rwcd%dc", lun); - ptr->a_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "wcd%da", lun); - ptr->c_devfs_token = - devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "wcd%dc", lun); -#endif + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "rwcd%da", lun); + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "rwcd%dc", lun); + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0), + UID_ROOT, GID_OPERATOR, 0640, "wcd%da", lun); + make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "wcd%dc", lun); return ptr; } diff --git a/sys/i386/isa/wd_cd.h b/sys/i386/isa/wd_cd.h index 86ab345..5bde4b7 100644 --- a/sys/i386/isa/wd_cd.h +++ b/sys/i386/isa/wd_cd.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.h,v 1.2 1998/10/15 08:11:55 sos Exp $ + * $Id: atapi-cd.h,v 1.3 1999/01/31 21:51:03 sos Exp $ */ /* @@ -346,12 +346,6 @@ struct acd { u_char speed; /* Select drive speed */ u_int next_writeable_lba; /* Next writable position */ struct wormio_prepare_track preptrack; /* Scratch region */ -#ifdef DEVFS - void *ra_devfs_token; - void *rc_devfs_token; - void *a_devfs_token; - void *c_devfs_token; -#endif }; #define CDRIOCBLANK _IO('c',100) /* Blank a CDRW disc */ diff --git a/sys/i386/isa/wfd.c b/sys/i386/isa/wfd.c index 9cf0684..a089527 100644 --- a/sys/i386/isa/wfd.c +++ b/sys/i386/isa/wfd.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wfd.c,v 1.26 1999/06/24 03:09:11 msmith Exp $ + * $Id: wfd.c,v 1.27 1999/08/14 11:40:41 phk Exp $ */ /* @@ -46,9 +46,6 @@ #include <sys/disklabel.h> #include <sys/diskslice.h> #include <sys/cdio.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <i386/isa/atapi.h> @@ -146,10 +143,6 @@ struct wfd { struct atapi_params *param; /* Drive parameters table */ struct cappage cap; /* Capabilities page info */ char description[80]; /* Device description */ -#ifdef DEVFS - void *cdevs; - void *bdevs; -#endif struct diskslices *dk_slices; /* virtual drives */ struct devstat device_stats; @@ -188,9 +181,6 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug) struct atapires result; int lun, i; -#ifdef DEVFS - int mynor; -#endif if (wfdnlun >= NUNIT) { printf ("wfd: too many units\n"); return (0); @@ -262,15 +252,8 @@ wfdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug) -#ifdef DEVFS - mynor = dkmakeminor(t->lun, WHOLE_DISK_SLICE, RAW_PART); - t->bdevs = devfs_add_devswf(&wfd_cdevsw, mynor, - DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "wfd%d", t->lun); - t->cdevs = devfs_add_devswf(&wfd_cdevsw, mynor, - DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rwfd%d", t->lun); -#endif /* DEVFS */ + make_dev(&wfd_cdevsw, dkmakeminor(t->lun, WHOLE_DISK_SLICE, RAW_PART), + UID_ROOT, GID_OPERATOR, 0640, "rwfd%d", t->lun); /* * Export the drive to the devstat interface. diff --git a/sys/i386/isa/wst.c b/sys/i386/isa/wst.c index 94d4146..7337796 100644 --- a/sys/i386/isa/wst.c +++ b/sys/i386/isa/wst.c @@ -25,13 +25,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wst.c,v 1.22 1999/05/30 16:52:30 phk Exp $ + * $Id: wst.c,v 1.23 1999/05/31 11:26:39 phk Exp $ */ #include "wdc.h" #include "wst.h" #include "opt_ddb.h" -#include "opt_devfs.h" #if NWST > 0 && NWDC > 0 @@ -42,9 +41,6 @@ #include <sys/malloc.h> #include <sys/buf.h> #include <sys/mtio.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif #include <machine/clock.h> #include <i386/isa/atapi.h> @@ -198,10 +194,6 @@ struct wst { struct atapi_params *param; /* Drive parameters table */ struct wst_header header; /* MODE SENSE param header */ struct wst_cappage cap; /* Capabilities page info */ -#ifdef DEVFS - void *cdevs; - void *bdevs; -#endif }; static struct wst *wsttab[NUNIT]; /* Drive info by unit number */ @@ -274,10 +266,7 @@ wstattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug) wst_describe(t); wstnlun++; -#ifdef DEVFS - t->cdevs = devfs_add_devswf(&wst_cdevsw, 0, DV_CHR, UID_ROOT, GID_OPERATOR, - 0640, "rwst%d", t->lun); -#endif /* DEVFS */ + make_dev(&wst_cdevsw, 0, UID_ROOT, GID_OPERATOR, 0640, "rwst%d", t->lun); return(1); } diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 73ccab3..36f2e01 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -20,7 +20,7 @@ * the original CMU copyright notice. * * Version 1.3, Thu Nov 11 12:09:13 MSK 1993 - * $Id: wt.c,v 1.51 1999/05/30 16:52:31 phk Exp $ + * $Id: wt.c,v 1.52 1999/05/31 11:26:40 phk Exp $ * */ @@ -60,7 +60,6 @@ #include "wt.h" #if NWT > 0 -#include "opt_devfs.h" #include <sys/param.h> #include <sys/systm.h> @@ -70,9 +69,6 @@ #include <sys/malloc.h> #include <sys/mtio.h> #include <sys/conf.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/clock.h> @@ -162,9 +158,6 @@ typedef struct { unsigned short DATAPORT, CMDPORT, STATPORT, CTLPORT, SDMAPORT, RDMAPORT; unsigned char BUSY, NOEXCEP, RESETMASK, RESETVAL; unsigned char ONLINE, RESET, REQUEST, IEN; -#ifdef DEVFS - void *devfs_token_r; -#endif } wtinfo_t; static wtinfo_t wttab[NWT]; /* tape info by unit number */ @@ -283,11 +276,7 @@ wtattach (struct isa_device *id) t->dens = -1; /* unknown density */ isa_dmainit(t->chan, 1024); -#ifdef DEVFS - t->devfs_token_r = - devfs_add_devswf(&wt_cdevsw, id->id_unit, DV_CHR, 0, 0, - 0600, "rwt%d", id->id_unit); -#endif + make_dev(&wt_cdevsw, id->id_unit, 0, 0, 0600, "rwt%d", id->id_unit); return (1); } |