diff options
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/i386/isa/dgb.c | 66 | ||||
-rw-r--r-- | sys/gnu/i386/isa/dgm.c | 59 |
2 files changed, 31 insertions, 94 deletions
diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c index e16c979..3e7e14e 100644 --- a/sys/gnu/i386/isa/dgb.c +++ b/sys/gnu/i386/isa/dgb.c @@ -1,5 +1,5 @@ /*- - * dgb.c $Id: dgb.c,v 1.49 1999/05/30 16:51:56 phk Exp $ + * dgb.c $Id: dgb.c,v 1.50 1999/05/31 11:25:31 phk Exp $ * * Digiboard driver. * @@ -28,7 +28,6 @@ */ #include "opt_compat.h" -#include "opt_devfs.h" #include "opt_dgb.h" #include "dgb.h" @@ -55,9 +54,6 @@ #include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/sysctl.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <machine/clock.h> @@ -148,16 +144,6 @@ struct dgb_p { u_char draining; /* port is being drained now */ u_char used; /* port is being used now */ u_char mustdrain; /* data must be waited to drain in dgbparam() */ -#ifdef DEVFS - struct { - void *tty; - void *ttyi; - void *ttyl; - void *cua; - void *cuai; - void *cual; - } devfs_token; -#endif }; /* Digiboard per-board structure */ @@ -546,9 +532,7 @@ dgbattach(dev) ushort *pstat; int lowwater; static int nports=0; -#ifdef DEVFS char suffix; -#endif if(sc->status!=ENABLED) { DPRINT2(DB_EXCEPT,"dbg%d: try to attach a disabled card\n",unit); @@ -917,39 +901,25 @@ load_fep: termioschars(&port->it_in); port->it_in.c_ispeed = port->it_in.c_ospeed = dgbdefaultrate; port->it_out = port->it_in; -#ifdef DEVFS /* MAX_DGB_PORTS is 32 => [0-9a-v] */ suffix = i < 10 ? '0' + i : 'a' + i - 10; - port->devfs_token.tty = - devfs_add_devswf(&dgb_cdevsw, (unit*32)+i, - DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttyD%d%c", unit, suffix); - - port->devfs_token.ttyi = - devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+32, - DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttyiD%d%c", unit, suffix); - - port->devfs_token.ttyl = - devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+64, - DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttylD%d%c", unit, suffix); - - port->devfs_token.cua = - devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+128, - DV_CHR, UID_UUCP, GID_DIALER, 0660, - "cuaD%d%c", unit, suffix); - - port->devfs_token.cuai = - devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+160, - DV_CHR, UID_UUCP, GID_DIALER, 0660, - "cuaiD%d%c", unit, suffix); - - port->devfs_token.cual = - devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+192, - DV_CHR, UID_UUCP, GID_DIALER, 0660, - "cualD%d%c", unit, suffix); -#endif + make_dev(&dgb_cdevsw, (unit*32)+i, + UID_ROOT, GID_WHEEL, 0600, "ttyD%d%c", unit, suffix); + + make_dev(&dgb_cdevsw, (unit*32)+i+32, + UID_ROOT, GID_WHEEL, 0600, "ttyiD%d%c", unit, suffix); + + make_dev(&dgb_cdevsw, (unit*32)+i+64, + UID_ROOT, GID_WHEEL, 0600, "ttylD%d%c", unit, suffix); + + make_dev(&dgb_cdevsw, (unit*32)+i+128, + UID_UUCP, GID_DIALER, 0660, "cuaD%d%c", unit, suffix); + + make_dev(&dgb_cdevsw, (unit*32)+i+160, + UID_UUCP, GID_DIALER, 0660, "cuaiD%d%c", unit, suffix); + + make_dev(&dgb_cdevsw, (unit*32)+i+192, + UID_UUCP, GID_DIALER, 0660, "cualD%d%c", unit, suffix); } hidewin(sc); diff --git a/sys/gnu/i386/isa/dgm.c b/sys/gnu/i386/isa/dgm.c index 6fa36ba..b289be4 100644 --- a/sys/gnu/i386/isa/dgm.c +++ b/sys/gnu/i386/isa/dgm.c @@ -1,5 +1,5 @@ /*- - * $Id: dgm.c,v 1.14 1999/05/30 16:51:58 phk Exp $ + * $Id: dgm.c,v 1.15 1999/05/31 11:25:33 phk Exp $ * * This driver and the associated header files support the ISA PC/Xem * Digiboards. Its evolutionary roots are described below. @@ -32,7 +32,6 @@ */ #include "opt_compat.h" -#include "opt_devfs.h" #include "dgm.h" @@ -59,9 +58,6 @@ #include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/sysctl.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif #include <machine/clock.h> @@ -150,16 +146,6 @@ struct dgm_p { u_char draining; /* port is being drained now */ u_char used; /* port is being used now */ u_char mustdrain; /* data must be waited to drain in dgmparam() */ -#ifdef DEVFS - struct { - void *tty; - void *ttyi; - void *ttyl; - void *cua; - void *cuai; - void *cual; - } devfs_token; -#endif }; /* Digiboard per-board structure */ @@ -726,37 +712,18 @@ dgmattach(dev) termioschars(&port->it_in); port->it_in.c_ispeed = port->it_in.c_ospeed = dgmdefaultrate; port->it_out = port->it_in; -#ifdef DEVFS - port->devfs_token.tty = - devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i, - DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttyM%d%x", unit, i + 0xa0); - - port->devfs_token.ttyi = - devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+64, - DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttyiM%d%x", unit, i + 0xa0); - - port->devfs_token.ttyl = - devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+128, - DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "ttylM%d%x", unit, i + 0xa0); - - port->devfs_token.cua = - devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+262144, - DV_CHR, UID_UUCP, GID_DIALER, 0660, - "cuaM%d%x", unit, i + 0xa0); - - port->devfs_token.cuai = - devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+262208, - DV_CHR, UID_UUCP, GID_DIALER, 0660, - "cuaiM%d%x", unit, i + 0xa0); - - port->devfs_token.cual = - devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+262272, - DV_CHR, UID_UUCP, GID_DIALER, 0660, - "cualM%d%x", unit, i + 0xa0); -#endif + make_dev(&dgm_cdevsw, (unit*65536)+i, + UID_ROOT, GID_WHEEL, 0600, "ttyM%d%x", unit, i + 0xa0); + make_dev(&dgm_cdevsw, (unit*65536)+i+64, + UID_ROOT, GID_WHEEL, 0600, "ttyiM%d%x", unit, i + 0xa0); + make_dev(&dgm_cdevsw, (unit*65536)+i+128, + UID_ROOT, GID_WHEEL, 0600, "ttylM%d%x", unit, i + 0xa0); + make_dev(&dgm_cdevsw, (unit*65536)+i+262144, + UID_UUCP, GID_DIALER, 0660, "cuaM%d%x", unit, i + 0xa0); + make_dev(&dgm_cdevsw, (unit*65536)+i+262208, + UID_UUCP, GID_DIALER, 0660, "cuaiM%d%x", unit, i + 0xa0); + make_dev(&dgm_cdevsw, (unit*65536)+i+262272, + UID_UUCP, GID_DIALER, 0660, "cualM%d%x", unit, i + 0xa0); } hidewin(sc); |