summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-08-27 07:26:26 +0000
committerjulian <julian@FreeBSD.org>1999-08-27 07:26:26 +0000
commita0797ab43e7d1e9c6641c6f2f89994f1f8dda27f (patch)
tree3b869586ea654277810c20b32801d13ccc0f0866 /sys/pc98
parentef5c098b80b05fce18894be29b3297b9f4436089 (diff)
downloadFreeBSD-src-a0797ab43e7d1e9c6641c6f2f89994f1f8dda27f.zip
FreeBSD-src-a0797ab43e7d1e9c6641c6f2f89994f1f8dda27f.tar.gz
Add PHK's make_dev() into more places where DEVFS used to be
hooked in directly. Alpha change checked by: Matthew Jacob <mjacob@feral.com> i4b ISDN changes checked by: Udo Schweigert <ust@cert.siemens.de> and Hellmuth Michaelis <hm@hcs.de> PC98 changes checked by: Takahashi Yoshihiro <nyan@FreeBSD.org>
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/fdc.c20
-rw-r--r--sys/pc98/cbus/olpt.c22
-rw-r--r--sys/pc98/cbus/sio.c46
-rw-r--r--sys/pc98/pc98/fd.c20
-rw-r--r--sys/pc98/pc98/mse.c20
-rw-r--r--sys/pc98/pc98/olpt.c22
-rw-r--r--sys/pc98/pc98/pcaudio.c21
-rw-r--r--sys/pc98/pc98/sio.c46
-rw-r--r--sys/pc98/pc98/spkr.c14
-rw-r--r--sys/pc98/pc98/syscons.c28
-rw-r--r--sys/pc98/pc98/wd.c27
11 files changed, 61 insertions, 225 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index e032a42..feae609 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -47,12 +47,11 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.67 1999/07/29 01:02:59 mdodd Exp $
+ * $Id: fd.c,v 1.68 1999/08/14 11:40:47 phk Exp $
*
*/
#include "fd.h"
-#include "opt_devfs.h"
#include "opt_fdc.h"
#if NFDC > 0
@@ -80,10 +79,6 @@
#include <machine/resource.h>
#include <machine/stdarg.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /* DEVFS */
-
#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
@@ -1164,7 +1159,7 @@ static int
fd_attach(device_t dev)
{
struct fd_data *fd;
-#ifdef DEVFS
+#if 0
int i;
int mynor;
int typemynor;
@@ -1173,14 +1168,9 @@ fd_attach(device_t dev)
fd = device_get_softc(dev);
-#ifdef DEVFS /* XXX bitrot */
- mynor = fd->fdu << 6;
- fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK,
- UID_ROOT, GID_OPERATOR, 0640,
- "fd%d", fd->fdu);
- fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR,
- UID_ROOT, GID_OPERATOR, 0640,
- "rfd%d", fd->fdu);
+ make_dev(&fd_cdevsw, (fd->fdu << 6),
+ UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
+#if 0 /* DEVFS */
for (i = 1; i < 1 + NUMDENS; i++) {
/*
* XXX this and the lookup in Fdopen() should be
diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c
index 5faeae4..fd35291 100644
--- a/sys/pc98/cbus/olpt.c
+++ b/sys/pc98/cbus/olpt.c
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: olpt.c,v 1.1 1999/06/18 14:48:26 kato Exp $
+ * $Id: olpt.c,v 1.2 1999/07/06 19:23:20 des Exp $
*/
/*
@@ -102,7 +102,6 @@
*/
#include "olpt.h"
-#include "opt_devfs.h"
#include "opt_inet.h"
#ifdef PC98
#undef INET /* PLIP is not supported for old PC-98 */
@@ -115,10 +114,6 @@
#include <sys/kernel.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
-
#include <machine/clock.h>
#include <machine/lpt.h>
@@ -238,10 +233,6 @@ static struct lpt_softc {
u_char *sc_ifbuf;
int sc_iferrs;
#endif
-#ifdef DEVFS
- void *devfs_token;
- void *devfs_token_ctl;
-#endif
} lpt_sc[NOLPT] ;
/* bits for state */
@@ -509,15 +500,10 @@ lptattach(struct isa_device *isdp)
}
lprintf(("irq %x\n", sc->sc_irq));
-#ifdef DEVFS
/* XXX what to do about the flags in the minor number? */
- sc->devfs_token = devfs_add_devswf(&lpt_cdevsw,
- unit, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "lpt%d", unit);
- sc->devfs_token_ctl = devfs_add_devswf(&lpt_cdevsw,
- unit | LP_BYPASS, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "lpctl%d", unit);
-#endif
+ make_dev(&lpt_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, "lpt%d", unit);
+ make_dev(&lpt_cdevsw, unit | LP_BYPASS,
+ UID_ROOT, GID_WHEEL, 0600, "lpctl%d", unit);
return (1);
}
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 6d66b30..857bd2b 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sio.c,v 1.101 1999/08/09 13:03:35 nyan Exp $
+ * $Id: sio.c,v 1.102 1999/08/17 04:33:11 nyan Exp $
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* from: i386/isa sio.c,v 1.234
*/
@@ -38,7 +38,6 @@
#include "opt_comconsole.h"
#include "opt_compat.h"
#include "opt_ddb.h"
-#include "opt_devfs.h"
#include "opt_sio.h"
#include "sio.h"
/* #include "pnp.h" */
@@ -154,9 +153,6 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <sys/timepps.h>
#ifdef PC98
@@ -418,14 +414,6 @@ struct com_s {
u_char obuf1[256];
u_char obuf2[256];
#endif
-#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
};
#ifdef COM_ESP
@@ -1833,26 +1821,18 @@ determined_type: ;
register_swi(SWI_TTY, siopoll);
sio_registered = TRUE;
}
-#ifdef DEVFS
- com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw,
- unit, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
- com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_INIT_STATE, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
- com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_LOCK_STATE, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
- com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
- com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
- com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
-#endif
+ make_dev(&sio_cdevsw, unit,
+ UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
+ make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
+ UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
+ make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
+ UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
+ UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE,
+ UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
+ UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
com->flags = isa_get_flags(dev); /* Heritate id_flags for later */
com->pps.ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR;
pps_init(&com->pps);
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index e032a42..feae609 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -47,12 +47,11 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.67 1999/07/29 01:02:59 mdodd Exp $
+ * $Id: fd.c,v 1.68 1999/08/14 11:40:47 phk Exp $
*
*/
#include "fd.h"
-#include "opt_devfs.h"
#include "opt_fdc.h"
#if NFDC > 0
@@ -80,10 +79,6 @@
#include <machine/resource.h>
#include <machine/stdarg.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /* DEVFS */
-
#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
@@ -1164,7 +1159,7 @@ static int
fd_attach(device_t dev)
{
struct fd_data *fd;
-#ifdef DEVFS
+#if 0
int i;
int mynor;
int typemynor;
@@ -1173,14 +1168,9 @@ fd_attach(device_t dev)
fd = device_get_softc(dev);
-#ifdef DEVFS /* XXX bitrot */
- mynor = fd->fdu << 6;
- fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK,
- UID_ROOT, GID_OPERATOR, 0640,
- "fd%d", fd->fdu);
- fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR,
- UID_ROOT, GID_OPERATOR, 0640,
- "rfd%d", fd->fdu);
+ make_dev(&fd_cdevsw, (fd->fdu << 6),
+ UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
+#if 0 /* DEVFS */
for (i = 1; i < 1 + NUMDENS; i++) {
/*
* XXX this and the lookup in Fdopen() should be
diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c
index 47c9d59..b82d1d3 100644
--- a/sys/pc98/pc98/mse.c
+++ b/sys/pc98/pc98/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.21 1999/05/30 16:53:19 phk Exp $
+ * $Id: mse.c,v 1.22 1999/05/31 11:28:36 phk Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -46,7 +46,6 @@
#include "mse.h"
#if NMSE > 0
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,9 +54,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>
@@ -128,10 +124,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 */
@@ -342,14 +334,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/pc98/pc98/olpt.c b/sys/pc98/pc98/olpt.c
index 5faeae4..fd35291 100644
--- a/sys/pc98/pc98/olpt.c
+++ b/sys/pc98/pc98/olpt.c
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: olpt.c,v 1.1 1999/06/18 14:48:26 kato Exp $
+ * $Id: olpt.c,v 1.2 1999/07/06 19:23:20 des Exp $
*/
/*
@@ -102,7 +102,6 @@
*/
#include "olpt.h"
-#include "opt_devfs.h"
#include "opt_inet.h"
#ifdef PC98
#undef INET /* PLIP is not supported for old PC-98 */
@@ -115,10 +114,6 @@
#include <sys/kernel.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
-
#include <machine/clock.h>
#include <machine/lpt.h>
@@ -238,10 +233,6 @@ static struct lpt_softc {
u_char *sc_ifbuf;
int sc_iferrs;
#endif
-#ifdef DEVFS
- void *devfs_token;
- void *devfs_token_ctl;
-#endif
} lpt_sc[NOLPT] ;
/* bits for state */
@@ -509,15 +500,10 @@ lptattach(struct isa_device *isdp)
}
lprintf(("irq %x\n", sc->sc_irq));
-#ifdef DEVFS
/* XXX what to do about the flags in the minor number? */
- sc->devfs_token = devfs_add_devswf(&lpt_cdevsw,
- unit, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "lpt%d", unit);
- sc->devfs_token_ctl = devfs_add_devswf(&lpt_cdevsw,
- unit | LP_BYPASS, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "lpctl%d", unit);
-#endif
+ make_dev(&lpt_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, "lpt%d", unit);
+ make_dev(&lpt_cdevsw, unit | LP_BYPASS,
+ UID_ROOT, GID_WHEEL, 0600, "lpctl%d", unit);
return (1);
}
diff --git a/sys/pc98/pc98/pcaudio.c b/sys/pc98/pc98/pcaudio.c
index 76d6e27..5c8dbf2 100644
--- a/sys/pc98/pc98/pcaudio.c
+++ b/sys/pc98/pc98/pcaudio.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: pcaudio.c,v 1.23 1999/05/30 16:53:21 phk Exp $
+ * $Id: pcaudio.c,v 1.24 1999/05/31 11:28:38 phk Exp $
*/
#include "pca.h"
#if NPCA > 0
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,9 +51,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
@@ -122,11 +118,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;
@@ -357,14 +348,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/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 6d66b30..857bd2b 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sio.c,v 1.101 1999/08/09 13:03:35 nyan Exp $
+ * $Id: sio.c,v 1.102 1999/08/17 04:33:11 nyan Exp $
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* from: i386/isa sio.c,v 1.234
*/
@@ -38,7 +38,6 @@
#include "opt_comconsole.h"
#include "opt_compat.h"
#include "opt_ddb.h"
-#include "opt_devfs.h"
#include "opt_sio.h"
#include "sio.h"
/* #include "pnp.h" */
@@ -154,9 +153,6 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <sys/timepps.h>
#ifdef PC98
@@ -418,14 +414,6 @@ struct com_s {
u_char obuf1[256];
u_char obuf2[256];
#endif
-#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
};
#ifdef COM_ESP
@@ -1833,26 +1821,18 @@ determined_type: ;
register_swi(SWI_TTY, siopoll);
sio_registered = TRUE;
}
-#ifdef DEVFS
- com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw,
- unit, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
- com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_INIT_STATE, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
- com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_LOCK_STATE, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
- com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
- com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
- com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
-#endif
+ make_dev(&sio_cdevsw, unit,
+ UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
+ make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
+ UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
+ make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
+ UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
+ UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE,
+ UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
+ UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
com->flags = isa_get_flags(dev); /* Heritate id_flags for later */
com->pps.ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR;
pps_init(&com->pps);
diff --git a/sys/pc98/pc98/spkr.c b/sys/pc98/pc98/spkr.c
index e00dc2a..44b2dd6 100644
--- a/sys/pc98/pc98/spkr.c
+++ b/sys/pc98/pc98/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.16 1999/05/31 11:28:40 phk Exp $
+ * $Id: spkr.c,v 1.17 1999/08/18 08:24:35 kato Exp $
*/
/*
@@ -15,7 +15,6 @@
#if NSPEAKER > 0
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -32,11 +31,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;
@@ -644,11 +638,7 @@ spkr_drvinit(void *unused)
if( ! spkr_devsw_installed ) {
cdevsw_add(&spkr_cdevsw);
spkr_devsw_installed = 1;
-#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");
}
}
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c
index 0d8b802..3dd7bc4 100644
--- a/sys/pc98/pc98/syscons.c
+++ b/sys/pc98/pc98/syscons.c
@@ -25,14 +25,13 @@
* (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: syscons.c,v 1.125 1999/08/09 10:35:03 phk Exp $
+ * $Id: syscons.c,v 1.126 1999/08/23 13:45:28 kato Exp $
*/
#include "sc.h"
#include "splash.h"
#include "opt_syscons.h"
#include "opt_ddb.h"
-#include "opt_devfs.h"
#ifdef __i386__
#include "apm.h"
#endif
@@ -48,10 +47,6 @@
#include <sys/tty.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
-
#include <machine/clock.h>
#include <sys/cons.h>
#include <machine/console.h>
@@ -88,10 +83,6 @@ static default_attr kernel_default = {
static int sc_console_unit = -1;
static scr_stat *sc_console;
-#ifdef DEVFS
-static void *sc_mouse_devfs_token;
-static void *sc_console_devfs_token;
-#endif
static term_stat kernel_console;
static default_attr *current_default;
@@ -308,9 +299,7 @@ sc_attach_unit(int unit, int flags)
#ifdef SC_PIXEL_MODE
video_info_t info;
#endif
-#ifdef DEVFS
int vc;
-#endif
scmeminit(NULL); /* XXX */
@@ -376,22 +365,15 @@ sc_attach_unit(int unit, int flags)
*/
cdevsw_add(&sc_cdevsw); /* XXX do this just once... */
-#ifdef DEVFS
for (vc = sc->first_vty; vc < sc->first_vty + sc->vtys; vc++)
- sc->devfs_token[vc] = devfs_add_devswf(&sc_cdevsw, vc,
- DV_CHR, UID_ROOT, GID_WHEEL,
- 0600, "ttyv%r", vc);
+ make_dev(&sc_cdevsw, vc, UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc);
if (scp == sc_console) {
#ifndef SC_NO_SYSMOUSE
- sc_mouse_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_MOUSE,
- DV_CHR, UID_ROOT, GID_WHEEL,
- 0600, "sysmouse");
+ make_dev(&sc_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600, "sysmouse");
#endif /* SC_NO_SYSMOUSE */
- sc_console_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_CONSOLECTL,
- DV_CHR, UID_ROOT, GID_WHEEL,
- 0600, "consolectl");
+ make_dev(&sc_cdevsw, SC_CONSOLECTL,
+ UID_ROOT, GID_WHEEL, 0600, "consolectl");
}
-#endif /* DEVFS */
return 0;
}
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index c5098b8..1c20cb6 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.85 1999/08/09 10:35:04 phk Exp $
+ * $Id: wd.c,v 1.86 1999/08/14 11:40:47 phk Exp $
*/
/* TODO:
@@ -64,7 +64,6 @@
#if NWDC > 0
-#include "opt_devfs.h"
#include "opt_hw_wdog.h"
#include "opt_ide_delay.h"
@@ -79,9 +78,6 @@
#include <sys/buf.h>
#include <sys/devicestat.h>
#include <sys/malloc.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/bootinfo.h>
#include <machine/clock.h>
#include <sys/cons.h>
@@ -176,10 +172,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 */
@@ -485,9 +477,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;
@@ -609,17 +598,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.
OpenPOWER on IntegriCloud