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>
This commit is contained in:
parent
ef5c098b80
commit
a0797ab43e
@ -38,22 +38,18 @@
|
||||
*
|
||||
* from: Utah $Hdr: mem.c 1.13 89/10/08$
|
||||
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: mem.c,v 1.10 1999/05/31 11:23:40 phk Exp $
|
||||
* $Id: mem.c,v 1.11 1999/06/27 20:52:22 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Memory special file
|
||||
*/
|
||||
|
||||
#include "opt_devfs.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif /* DEVFS */
|
||||
#include <sys/conf.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -104,48 +100,7 @@ static struct cdevsw mem_cdevsw = {
|
||||
/* bmaj */ -1
|
||||
};
|
||||
|
||||
#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");
|
||||
#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)
|
||||
@ -450,9 +405,15 @@ mem_drvinit(void *unused)
|
||||
{
|
||||
|
||||
cdevsw_add(&mem_cdevsw);
|
||||
#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");
|
||||
#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)
|
||||
|
@ -47,7 +47,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.152 1999/08/14 11:40:41 phk Exp $
|
||||
* $Id: fd.c,v 1.153 1999/08/23 20:58:59 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -906,9 +906,22 @@ static int
|
||||
fd_attach(device_t dev)
|
||||
{
|
||||
struct fd_data *fd;
|
||||
#if 0
|
||||
int i;
|
||||
int mynor;
|
||||
int typemynor;
|
||||
int typesize;
|
||||
#endif
|
||||
|
||||
fd = device_get_softc(dev);
|
||||
|
||||
make_dev(&fd_cdevsw, (fd->fdu << 6),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
|
||||
|
||||
#if 0
|
||||
/* Other make_dev() go here. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Export the drive to the devstat interface.
|
||||
*/
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4b_ctl.c - i4b system control port driver
|
||||
* ------------------------------------------
|
||||
*
|
||||
* $Id: i4b_ctl.c,v 1.25 1999/06/08 08:13:00 hm Exp $
|
||||
* $Id: i4b_ctl.c,v 1.6 1999/08/06 14:02:02 hm Exp $
|
||||
*
|
||||
* last edit-date: [Tue Jun 8 09:27:15 1999]
|
||||
*
|
||||
@ -59,14 +59,6 @@
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_devfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/i4b_debug.h>
|
||||
#include <machine/i4b_ioctl.h>
|
||||
@ -136,10 +128,6 @@ PSEUDO_SET(i4bctlattach, i4b_i4bctldrv);
|
||||
#define PDEVSTATIC static
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
#ifdef DEVFS
|
||||
static void *devfs_token;
|
||||
#endif
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
#define PDEVSTATIC /* */
|
||||
void i4bctlattach __P((void));
|
||||
@ -212,11 +200,7 @@ i4bctlattach()
|
||||
#ifndef HACK_NO_PSEUDO_ATTACH_MSG
|
||||
printf("i4bctl: ISDN system control port attached\n");
|
||||
#endif
|
||||
#ifdef DEVFS
|
||||
devfs_token = devfs_add_devswf(&i4bctl_cdevsw, 0, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600,
|
||||
"i4bctl");
|
||||
#endif
|
||||
make_dev(&i4bctl_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "i4bctl");
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4b_rbch.c - device driver for raw B channel data
|
||||
* ---------------------------------------------------
|
||||
*
|
||||
* $Id: i4b_rbch.c,v 1.36 1999/07/19 14:03:33 hm Exp $
|
||||
* $Id: i4b_rbch.c,v 1.5 1999/08/06 14:02:04 hm Exp $
|
||||
*
|
||||
* last edit-date: [Fri Jul 9 09:37:02 1999]
|
||||
*
|
||||
@ -54,14 +54,6 @@ extern cc_t ttydefchars;
|
||||
#define termioschars(t) memcpy((t)->c_cc, &ttydefchars, sizeof((t)->c_cc))
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_devfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#include <sys/filio.h>
|
||||
#define bootverbose 0
|
||||
@ -124,10 +116,6 @@ static struct rbch_softc {
|
||||
#define I4BRBCHMAXQLEN 10
|
||||
|
||||
struct selinfo selp; /* select / poll */
|
||||
|
||||
#ifdef DEVFS
|
||||
void *devfs_token; /* device filesystem */
|
||||
#endif
|
||||
} rbch_softc[NI4BRBCH];
|
||||
|
||||
static void rbch_rx_data_rdy(int unit);
|
||||
@ -280,12 +268,8 @@ i4brbchattach()
|
||||
|
||||
for(i=0; i < NI4BRBCH; i++)
|
||||
{
|
||||
#ifdef DEVFS
|
||||
rbch_softc[i].devfs_token =
|
||||
devfs_add_devswf(&i4brbch_cdevsw, i, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600,
|
||||
"i4brbch%d", i);
|
||||
#endif
|
||||
make_dev(&i4brbch_cdevsw, i,
|
||||
UID_ROOT, GID_WHEEL, 0600, "i4brbch%d", i);
|
||||
rbch_softc[i].sc_devstate = ST_IDLE;
|
||||
rbch_softc[i].sc_hdlcq.ifq_maxlen = I4BRBCHMAXQLEN;
|
||||
rbch_softc[i].it_in.c_ispeed = rbch_softc[i].it_in.c_ospeed = 64000;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4b_tel.c - device driver for ISDN telephony
|
||||
* --------------------------------------------
|
||||
*
|
||||
* $Id: i4b_tel.c,v 1.43 1999/07/09 06:44:00 hm Exp $
|
||||
* $Id: i4b_tel.c,v 1.5 1999/08/06 14:02:04 hm Exp $
|
||||
*
|
||||
* last edit-date: [Fri Jul 9 08:35:30 1999]
|
||||
*
|
||||
@ -59,14 +59,6 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/tty.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_devfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif
|
||||
|
||||
#ifdef __bsdi__
|
||||
#include <sys/device.h>
|
||||
#endif
|
||||
@ -130,10 +122,6 @@ typedef struct {
|
||||
#define ST_WRWAITEMPTY 0x08 /* userland write waiting */
|
||||
|
||||
struct selinfo selp; /* select / poll */
|
||||
|
||||
#ifdef DEVFS
|
||||
void *devfs_token; /* token for DEVFS */
|
||||
#endif
|
||||
} tel_sc_t;
|
||||
|
||||
static tel_sc_t tel_sc[NI4BTEL][NOFUNCS];
|
||||
@ -311,13 +299,8 @@ i4btelattach()
|
||||
tel_sc[i][j].wcvttab = 0;
|
||||
tel_sc[i][j].result = 0;
|
||||
tel_init_linktab(i);
|
||||
#ifdef DEVFS
|
||||
|
||||
/* XXX */ tel_sc[i][j].devfs_token
|
||||
= devfs_add_devswf(&i4btel_cdevsw, i, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600,
|
||||
"i4btel%d", i);
|
||||
#endif
|
||||
make_dev(&i4btel_cdevsw, i,
|
||||
UID_ROOT, GID_WHEEL, 0600, "i4btel%d", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4btrc - device driver for trace data read device
|
||||
* ---------------------------------------------------
|
||||
*
|
||||
* $Id: i4b_trace.c,v 1.20 1999/06/01 10:23:58 hm Exp $
|
||||
* $Id: i4b_trace.c,v 1.5 1999/08/06 14:02:04 hm Exp $
|
||||
*
|
||||
* last edit-date: [Tue Jun 1 12:15:40 1999]
|
||||
*
|
||||
@ -68,14 +68,6 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/tty.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_devfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/i4b_trace.h>
|
||||
#include <machine/i4b_ioctl.h>
|
||||
@ -97,9 +89,6 @@ static int device_state[NI4BTRC];
|
||||
#define ST_IDLE 0x00
|
||||
#define ST_ISOPEN 0x01
|
||||
#define ST_WAITDATA 0x02
|
||||
#ifdef DEVFS
|
||||
static void *devfs_token[NI4BTRC];
|
||||
#endif
|
||||
|
||||
static int analyzemode = 0;
|
||||
static int rxunit = -1;
|
||||
@ -237,12 +226,8 @@ i4btrcattach()
|
||||
|
||||
for(i=0; i < NI4BTRC; i++)
|
||||
{
|
||||
#ifdef DEVFS
|
||||
devfs_token[i]
|
||||
= devfs_add_devswf(&i4btrc_cdevsw, i, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600,
|
||||
"i4btrc%d", i);
|
||||
#endif
|
||||
make_dev(&i4btrc_cdevsw, i,
|
||||
UID_ROOT, GID_WHEEL, 0600, "i4btrc%d", i);
|
||||
trace_queue[i].ifq_maxlen = IFQ_MAXLEN;
|
||||
device_state[i] = ST_IDLE;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
* i4b_i4bdrv.c - i4b userland interface driver
|
||||
* --------------------------------------------
|
||||
*
|
||||
* $Id: i4b_i4bdrv.c,v 1.47 1999/06/08 17:49:44 hm Exp $
|
||||
* $Id: i4b_i4bdrv.c,v 1.7 1999/08/06 14:02:45 hm Exp $
|
||||
*
|
||||
* last edit-date: [Tue Jun 8 19:48:16 1999]
|
||||
*
|
||||
@ -69,14 +69,6 @@
|
||||
#include <sys/select.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_devfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/i4b_debug.h>
|
||||
#include <machine/i4b_ioctl.h>
|
||||
@ -103,9 +95,6 @@ static struct ifqueue i4b_rdqueue;
|
||||
static int openflag = 0;
|
||||
static int selflag = 0;
|
||||
static int readflag = 0;
|
||||
#ifdef DEVFS
|
||||
static void *devfs_token;
|
||||
#endif
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
|
||||
@ -247,11 +236,7 @@ i4battach()
|
||||
printf("i4b: ISDN call control device attached\n");
|
||||
#endif
|
||||
i4b_rdqueue.ifq_maxlen = IFQ_MAXLEN;
|
||||
#ifdef DEVFS
|
||||
devfs_token = devfs_add_devswf(&i4b_cdevsw, 0, DV_CHR,
|
||||
UID_ROOT, GID_WHEEL, 0600,
|
||||
"i4b");
|
||||
#endif
|
||||
make_dev(&i4b_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "i4b");
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
|
15
sys/isa/fd.c
15
sys/isa/fd.c
@ -47,7 +47,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.152 1999/08/14 11:40:41 phk Exp $
|
||||
* $Id: fd.c,v 1.153 1999/08/23 20:58:59 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -906,9 +906,22 @@ static int
|
||||
fd_attach(device_t dev)
|
||||
{
|
||||
struct fd_data *fd;
|
||||
#if 0
|
||||
int i;
|
||||
int mynor;
|
||||
int typemynor;
|
||||
int typesize;
|
||||
#endif
|
||||
|
||||
fd = device_get_softc(dev);
|
||||
|
||||
make_dev(&fd_cdevsw, (fd->fdu << 6),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
|
||||
|
||||
#if 0
|
||||
/* Other make_dev() go here. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Export the drive to the devstat interface.
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 @@ wdprobe(struct isa_device *dvp)
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user