Convert DEVFS hooks in (most) drivers to make_dev().

Diskslice/label code not yet handled.

Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)

Add the correct hook for devfs to kern_conf.c

The net result of this excercise is that a lot less files depends on DEVFS,
and devtoname() gets more sensible output in many cases.

A few drivers had minor additional cleanups performed relating to cdevsw
registration.

A few drivers don't register a cdevsw{} anymore, but only use make_dev().
This commit is contained in:
Poul-Henning Kamp 1999-08-23 20:59:21 +00:00
parent d918320517
commit 9dcbe2404a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50254
102 changed files with 466 additions and 2145 deletions

View file

@ -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)

View file

@ -12,11 +12,12 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id$
* $Id: cam_extend.c,v 1.1 1998/09/15 06:33:23 gibbs Exp $
*/
/*
* XXX XXX XXX XXX We should get DEVFS working so that we
* don't have to do this, possibly sparse, array based junk.
* XXX: We can do this now with dev_t, that's even better.
*/
/*
* Extensible arrays: Use a realloc like implementation to permit

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cam_xpt.c,v 1.66 1999/08/16 17:47:39 mjacob Exp $
* $Id: cam_xpt.c,v 1.67 1999/08/16 22:22:41 gibbs Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@ -207,10 +207,6 @@ typedef enum {
struct xpt_softc {
xpt_flags flags;
u_int32_t generation;
#ifdef DEVFS
void *xpt_devfs_token;
void *ctl_devfs_token;
#endif
};
static const char quantum[] = "QUANTUM";

View file

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: scsi_pass.c,v 1.11 1999/05/30 16:51:03 phk Exp $
* $Id: scsi_pass.c,v 1.12 1999/05/31 11:24:05 phk Exp $
*/
#include <sys/param.h>
@ -82,10 +82,6 @@ struct pass_softc {
struct buf_queue_head buf_queue;
union ccb saved_ccb;
struct devstat device_stats;
#ifdef DEVFS
void *pass_devfs_token;
void *ctl_devfs_token;
#endif
};
#ifndef MIN

View file

@ -27,12 +27,11 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_fbsd.c,v 1.14 1999/05/30 16:51:10 phk Exp $
* $Id: coda_fbsd.c,v 1.15 1999/05/31 11:24:16 phk Exp $
*
*/
#include "vcoda.h"
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -52,13 +51,6 @@
#include <coda/coda_vnops.h>
#include <coda/coda_psdev.h>
#ifdef DEVFS
#include <sys/devfsext.h>
static void *cfs_devfs_token[NVCODA];
static void *coda_devfs_token[NVCODA];
#endif
/*
From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
Subject: Re: New 3.0 SNAPshot CDROM about ready for production..
@ -101,38 +93,12 @@ int vcdebug = 1;
static int
codadev_modevent(module_t mod, int type, void *data)
{
#ifdef DEVFS
int i;
#endif
static struct cdevsw *oldcdevsw;
switch (type) {
case MOD_LOAD:
cdevsw_add(&codadevsw);
#ifdef DEVFS
/* tmp */
#undef NVCODA
#define NVCODA 1
for (i = 0; i < NVCODA; i++) {
cfs_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"cfs%d", i);
coda_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"coda%d", i);
}
#endif
break;
case MOD_UNLOAD:
#ifdef DEVFS
for (i = 0; i < NVCODA; i++) {
devfs_remove_dev(cfs_devfs_token[i]);
devfs_remove_dev(coda_devfs_token[i]);
}
#endif
cdevsw_add(oldcdevsw);
break;
default:
break;

View file

@ -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: ata-disk.c,v 1.16 1999/08/10 21:59:57 sos Exp $
* $Id: ata-disk.c,v 1.17 1999/08/14 11:40:33 phk Exp $
*/
#include "ata.h"
#include "atadisk.h"
#include "opt_devfs.h"
#if NATA > 0 && NATADISK > 0
#include <sys/param.h>
@ -47,9 +45,6 @@
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/stat.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <vm/vm.h>
#include <vm/vm_prot.h>
#include <vm/pmap.h>
@ -236,18 +231,10 @@ ad_attach(void *notused)
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
0x180);
#ifdef DEVFS
adp->cdevs_token = devfs_add_devswf(&ad_cdevsw,
dkmakeminor(adp->lun, 0, 0),
DV_CHR,
UID_ROOT, GID_OPERATOR,
0640, "rad%d", adp->lun);
adp->bdevs_token = devfs_add_devswf(&ad_cdevsw,
dkmakeminor(adp->lun, 0, 0),
DV_BLK,
UID_ROOT, GID_OPERATOR,
0640, "ad%d", adp->lun);
#endif
make_dev(&ad_cdevsw, dkmakeminor(adp->lun, 0, 0),
UID_ROOT, GID_OPERATOR, 0640, "rad%d", adp->lun);
make_dev(&ad_cdevsw, dkmakeminor(adp->lun, 0, 0),
UID_ROOT, GID_OPERATOR, 0640, "ad%d", adp->lun);
bufq_init(&adp->queue);
adtab[adnlun++] = adp;
}

View file

@ -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: ata-disk.h,v 1.6 1999/05/20 09:12:03 sos Exp $
* $Id: ata-disk.h,v 1.7 1999/06/25 09:03:00 sos Exp $
*/
/* ATA device parameter information */
@ -140,10 +140,6 @@ struct ad_softc {
struct buf_queue_head queue; /* head of request queue */
struct devstat stats; /* devstat entry */
#ifdef DEVFS
void *cdevs_token;
void *bdevs_token;
#endif
};
struct ad_request {

View file

@ -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: atapi-all.c,v 1.10 1999/06/25 09:03:01 sos Exp $
* $Id: atapi-all.c,v 1.11 1999/08/10 21:59:58 sos Exp $
*/
#include "ata.h"
#include "atapicd.h"
#include "atapist.h"
#include "atapifd.h"
#include "opt_devfs.h"
#if NATA > 0

View file

@ -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.10 1999/05/31 11:24:27 phk Exp $
* $Id: atapi-cd.c,v 1.11 1999/06/25 09:03:04 sos Exp $
*/
#include "ata.h"
#include "atapicd.h"
#include "opt_devfs.h"
#if NATA > 0 && NATAPICD > 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 <pci/pcivar.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/atapi-all.h>
@ -239,22 +235,14 @@ acd_init_lun(struct atapi_softc *atp, int32_t lun, struct devstat *stats)
}
else
acd->stats = stats;
#ifdef DEVFS
acd->a_cdevfs_token = devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
DV_CHR, UID_ROOT, GID_OPERATOR, 0644,
"racd%da", lun);
acd->c_cdevfs_token = devfs_add_devswf(&acd_cdevsw,
dkmakeminor(lun, 0, RAW_PART),
DV_CHR, UID_ROOT, GID_OPERATOR, 0644,
"racd%dc", lun);
acd->a_bdevfs_token = devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
DV_BLK, UID_ROOT, GID_OPERATOR, 0644,
"acd%da", lun);
acd->c_bdevfs_token = devfs_add_devswf(&acd_cdevsw,
dkmakeminor(lun, 0, RAW_PART),
DV_BLK, UID_ROOT, GID_OPERATOR, 0644,
"acd%dc", lun);
#endif
make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0),
UID_ROOT, GID_OPERATOR, 0644, "racd%da", lun);
make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
UID_ROOT, GID_OPERATOR, 0644, "racd%dc", lun);
make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0),
UID_ROOT, GID_OPERATOR, 0644, "acd%da", lun);
make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
UID_ROOT, GID_OPERATOR, 0644, "acd%dc", lun);
return acd;
}

View file

@ -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.1 1999/03/01 21:19:18 sos Exp $
* $Id: atapi-cd.h,v 1.2 1999/03/03 21:10:29 sos Exp $
*/
/* CDROM Table Of Contents */
@ -334,12 +334,6 @@ struct acd_softc {
u_int32_t next_writeable_lba; /* next writable position */
struct wormio_prepare_track preptrack; /* scratch region */
struct devstat *stats; /* devstat entry */
#ifdef DEVFS
void *a_cdevfs_token;
void *c_cdevfs_token;
void *a_bdevfs_token;
void *c_bdevfs_token;
#endif
};
#define CDRIOCBLANK _IO('c',100) /* blank a CDRW disc */

View file

@ -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-fd.c,v 1.11 1999/06/25 09:03:05 sos Exp $
* $Id: atapi-fd.c,v 1.12 1999/08/14 11:40:33 phk Exp $
*/
#include "ata.h"
#include "atapifd.h"
#include "opt_devfs.h"
#if NATA > 0 && NATAPIFD > 0
@ -48,9 +47,6 @@
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/stat.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <pci/pcivar.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/atapi-all.h>
@ -137,14 +133,10 @@ afdattach(struct atapi_softc *atp)
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
0x174);
#ifdef DEVFS
fdp->cdevs_token = devfs_add_devswf(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
DV_CHR, UID_ROOT, GID_OPERATOR,
0640, "rafd%d", fdp->lun);
fdp->bdevs_token = devfs_add_devswf(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
DV_BLK, UID_ROOT, GID_OPERATOR,
0640, "afd%d", fdp->lun);
#endif
make_dev(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
UID_ROOT, GID_OPERATOR, 0640, "rafd%d", fdp->lun);
make_dev(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
UID_ROOT, GID_OPERATOR, 0640, "afd%d", fdp->lun);
return 0;
}

View file

@ -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-fd.h,v 1.1 1999/03/03 21:10:29 sos Exp $
* $Id: atapi-fd.h,v 1.2 1999/05/20 09:12:06 sos Exp $
*/
/* MODE SENSE parameter header */
@ -82,9 +82,5 @@ struct afd_softc {
struct afd_cappage cap; /* capabilities page info */
struct diskslices *slices; /* virtual drives */
struct devstat stats;
#ifdef DEVFS
void *cdevs_token;
void *bdevs_token;
#endif
};

View file

@ -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-tape.c,v 1.10 1999/05/31 11:24:30 phk Exp $
* $Id: atapi-tape.c,v 1.11 1999/06/25 09:03:06 sos Exp $
*/
#include "ata.h"
#include "atapist.h"
#include "opt_devfs.h"
#if NATA > 0 && NATAPIST > 0
@ -43,9 +42,6 @@
#include <sys/mtio.h>
#include <sys/disklabel.h>
#include <sys/devicestat.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <machine/clock.h>
#include <pci/pcivar.h>
#include <dev/ata/ata-all.h>
@ -136,11 +132,8 @@ astattach(struct atapi_softc *atp)
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_SEQUENTIAL | DEVSTAT_TYPE_IF_IDE,
0x170);
#ifdef DEVFS
stp->cdevs_token = devfs_add_devswf(&ast_cdevsw, dkmakeminor(stp->lun, 0,0),
DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
"rast%d", stp->lun);
#endif
make_dev(&ast_cdevsw, dkmakeminor(stp->lun, 0,0),
UID_ROOT, GID_OPERATOR, 0640, "rast%d", stp->lun);
return 0;
}

View file

@ -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-tape.h,v 1.3 1999/03/07 21:49:14 sos Exp $
* $Id: atapi-tape.h,v 1.4 1999/06/25 09:03:07 sos Exp $
*/
/* MODE SENSE parameter header */
@ -86,8 +86,4 @@ struct ast_softc {
struct ast_header header; /* MODE SENSE param header */
struct ast_cappage cap; /* capabilities page info */
struct devstat stats; /* devstat entry */
#ifdef DEVFS
void *cdevs_token;
void *bdevs_token;
#endif
};

View file

@ -23,13 +23,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: atkbd.c,v 1.13 1999/08/15 06:06:14 yokota Exp $
* $Id: atkbd.c,v 1.14 1999/08/22 09:52:32 yokota Exp $
*/
#include "atkbd.h"
#include "opt_kbd.h"
#include "opt_atkbd.h"
#include "opt_devfs.h"
#if NATKBD > 0

View file

@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: psm.c,v 1.15 1999/08/17 12:14:13 yokota Exp $
* $Id: psm.c,v 1.16 1999/08/22 06:11:52 yokota Exp $
*/
/*
@ -65,7 +65,6 @@
#ifdef __i386__
#include "apm.h"
#endif
#include "opt_devfs.h"
#include "opt_psm.h"
#if NPSM > 0
@ -81,9 +80,6 @@
#include <sys/malloc.h>
#include <machine/bus.h>
#include <sys/rman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <sys/select.h>
#include <sys/uio.h>
@ -181,10 +177,6 @@ struct psm_softc { /* Driver status information */
int button; /* the latest button state */
int xold; /* previous absolute X position */
int yold; /* previous absolute Y position */
#ifdef DEVFS
void *devfs_token;
void *b_devfs_token;
#endif
#ifdef PSM_HOOKAPM
struct apmhook resumehook;
#endif
@ -1094,14 +1086,8 @@ psmattach(device_t dev)
sc->state = PSM_VALID;
/* Done */
#ifdef DEVFS
sc->devfs_token =
devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, FALSE),
DV_CHR, 0, 0, 0666, "psm%d", unit);
sc->b_devfs_token =
devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, TRUE),
DV_CHR, 0, 0, 0666, "bpsm%d", unit);
#endif /* DEVFS */
make_dev(&psm_cdevsw, PSM_MKMINOR(unit, FALSE), 0, 0, 0666, "psm%d", unit);
make_dev(&psm_cdevsw, PSM_MKMINOR(unit, TRUE), 0, 0, 0666, "bpsm%d", unit);
#ifdef PSM_HOOKAPM
sc->resumehook.ah_name = "PS/2 mouse";

View file

@ -1,4 +1,4 @@
/* $Id: brooktree848.c,v 1.85 1999/06/12 14:54:54 roger Exp $ */
/* $Id: brooktree848.c,v 1.89 1999/07/12 15:51:48 roger Exp $ */
/* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards.
The Brooktree BT848 Driver driver is based upon Mark Tinguely and
Jim Lowe's driver for the Matrox Meteor PCI card . The
@ -444,7 +444,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
#ifdef __FreeBSD__
#include "bktr.h"
#include "opt_bktr.h"
#include "opt_devfs.h"
#include "pci.h"
#endif /* __FreeBSD__ */
@ -485,10 +484,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
#define NSMBUS 0
#endif
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /* DEVFS */
#if (__FreeBSD_version >=400000) || (NSMBUS > 0)
#include <sys/bus.h> /* used by smbus and newbus */
#endif
@ -6961,13 +6956,9 @@ bktr_attach( device_t dev )
/* call the common attach code */
common_bktr_attach( bktr, unit, fun, rev );
#ifdef DEVFS
/* XXX This just throw away the token, which should probably be fixed when
DEVFS is finally made really operational. */
devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit);
#endif /* DEVFS */
make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit);
make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit);
make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit);
return 0;
@ -7473,13 +7464,9 @@ bktr_attach( pcici_t tag, int unit )
/* call the common attach code */
common_bktr_attach( bktr, unit, fun, rev );
#ifdef DEVFS
/* XXX This just throw away the token, which should probably be fixed when
DEVFS is finally made really operational. */
devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit);
#endif /* DEVFS */
make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit);
make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit);
make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit);
}

View file

@ -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
}
}

View file

@ -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
}
}

View file

@ -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 @@ dgbattach(dev)
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);
make_dev(&dgb_cdevsw, (unit*32)+i,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+32,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+64,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+128,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+160,
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+192,
UID_UUCP, GID_DIALER, 0660, "cualD%d%c", unit, suffix);
}
hidewin(sc);

View file

@ -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);

View file

@ -40,21 +40,13 @@
*/
#ident "$Id: dpt.h,v 1.3 1998/09/20 07:19:52 gibbs Exp $"
#ident "$Id: dpt.h,v 1.4 1998/09/22 04:55:07 gibbs Exp $"
#ifndef _DPT_H
#define _DPT_H
#include <sys/ioccom.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#ifdef SLICE
#include <sys/device.h>
#include <dev/slice/slice.h>
#endif /* SLICE */
#endif
#define DPT_CDEV_MAJOR 88
#undef DPT_USE_DLM_SWI

View file

@ -32,9 +32,8 @@
* dptpci.c: PCI Bus Attachment for DPT SCSI HBAs
*/
#ident "$Id: dpt_pci.c,v 1.13 1999/05/09 17:06:44 peter Exp $"
#ident "$Id: dpt_pci.c,v 1.14 1999/08/16 01:52:20 gibbs Exp $"
#include "opt_devfs.h"
#include "opt_dpt.h"
#include <sys/param.h>

View file

@ -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: fb.c,v 1.6 1999/06/22 14:13:22 yokota Exp $
* $Id: fb.c,v 1.7 1999/07/04 14:58:15 phk Exp $
*/
#include "fb.h"
@ -409,8 +409,6 @@ fb_attach(dev_t dev, video_adapter_t *adp, struct cdevsw *cdevsw)
vidcdevsw[adp->va_index] = cdevsw;
splx(s);
/* XXX: DEVFS? */
printf("fb%d at %s%d\n", adp->va_index, adp->va_name, adp->va_unit);
return 0;
}

View file

@ -47,12 +47,11 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.151 1999/07/29 11:27:33 joerg Exp $
* $Id: fd.c,v 1.152 1999/08/14 11:40:41 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>
#include <isa/isareg.h>
#include <isa/fdreg.h>
@ -184,10 +179,6 @@ struct fd_data {
struct callout_handle toffhandle;
struct callout_handle tohandle;
struct devstat device_stats;
#ifdef DEVFS
void *bdevs[1 + NUMDENS + MAXPARTITIONS];
void *cdevs[1 + NUMDENS + MAXPARTITIONS];
#endif
device_t dev;
fdu_t fdu;
};
@ -915,78 +906,9 @@ static int
fd_attach(device_t dev)
{
struct fd_data *fd;
#ifdef DEVFS
int i;
int mynor;
int typemynor;
int typesize;
#endif
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);
for (i = 1; i < 1 + NUMDENS; i++) {
/*
* XXX this and the lookup in Fdopen() should be
* data driven.
*/
switch (fd->type) {
case FD_360:
if (i != FD_360)
continue;
break;
case FD_720:
if (i != FD_720 && i != FD_800 && i != FD_820)
continue;
break;
case FD_1200:
if (i != FD_360 && i != FD_720 && i != FD_800
&& i != FD_820 && i != FD_1200
&& i != FD_1440 && i != FD_1480)
continue;
break;
case FD_1440:
if (i != FD_720 && i != FD_800 && i != FD_820
&& i != FD_1200 && i != FD_1440
&& i != FD_1480 && i != FD_1720)
continue;
break;
}
typesize = fd_types[i - 1].size / 2;
/*
* XXX all these conversions give bloated code and
* confusing names.
*/
if (typesize == 1476)
typesize = 1480;
if (typesize == 1722)
typesize = 1720;
typemynor = mynor | i;
fd->bdevs[i] =
devfs_add_devswf(&fd_cdevsw, typemynor, DV_BLK,
UID_ROOT, GID_OPERATOR, 0640,
"fd%d.%d", fd->fdu, typesize);
fd->cdevs[i] =
devfs_add_devswf(&fd_cdevsw, typemynor, DV_CHR,
UID_ROOT, GID_OPERATOR, 0640,
"rfd%d.%d", fd->fdu, typesize);
}
for (i = 0; i < MAXPARTITIONS; i++) {
fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0],
"fd%d%c", fd->fdu, 'a' + i);
fd->cdevs[1 + NUMDENS + i] =
devfs_makelink(fd->cdevs[0],
"rfd%d%c", fd->fdu, 'a' + i);
}
#endif /* DEVFS */
/*
* Export the drive to the devstat interface.
*/
@ -1010,11 +932,6 @@ static int yeattach(struct isa_device *dev)
fdu_t fdu;
fd_p fd;
int st0, st3, i;
#ifdef DEVFS
int mynor;
int typemynor;
int typesize;
#endif
fdc->fdcu = fdcu;
/*
* the FDC_PCMCIA flag is used to to indicate special PIO is used
@ -1090,41 +1007,6 @@ static int yeattach(struct isa_device *dev)
printf("fdc%d: 1.44MB 3.5in PCMCIA\n", fdcu);
fd->type = FD_1440;
#ifdef DEVFS
mynor = fdcu << 6;
fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK,
UID_ROOT, GID_OPERATOR, 0640,
"fd%d", fdu);
fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR,
UID_ROOT, GID_OPERATOR, 0640,
"rfd%d", fdu);
/*
* XXX this and the lookup in Fdopen() should be
* data driven.
*/
typemynor = mynor | FD_1440;
typesize = fd_types[FD_1440 - 1].size / 2;
/*
* XXX all these conversions give bloated code and
* confusing names.
*/
if (typesize == 1476)
typesize = 1480;
if (typesize == 1722)
typesize = 1720;
fd->bdevs[FD_1440] = devfs_add_devswf(&fd_cdevsw, typemynor,
DV_BLK, UID_ROOT, GID_OPERATOR,
0640, "fd%d.%d", fdu, typesize);
fd->cdevs[FD_1440] = devfs_add_devswf(&fd_cdevsw, typemynor,
DV_CHR, UID_ROOT, GID_OPERATOR,
0640,"rfd%d.%d", fdu, typesize);
for (i = 0; i < MAXPARTITIONS; i++) {
fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0],
"fd%d%c", fdu, 'a' + i);
fd->cdevs[1 + NUMDENS + i] = devfs_makelink(fd->cdevs[0],
"rfd%d%c", fdu, 'a' + i);
}
#endif /* DEVFS */
return (1);
}
#endif

View file

@ -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;
}

View file

@ -23,13 +23,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: atkbd.c,v 1.13 1999/08/15 06:06:14 yokota Exp $
* $Id: atkbd.c,v 1.14 1999/08/22 09:52:32 yokota Exp $
*/
#include "atkbd.h"
#include "opt_kbd.h"
#include "opt_atkbd.h"
#include "opt_devfs.h"
#if NATKBD > 0

View file

@ -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;
}

View file

@ -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);
}

View file

@ -23,13 +23,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: pci.c,v 1.113 1999/07/28 07:57:47 dfr Exp $
* $Id: pci.c,v 1.114 1999/07/29 01:03:03 mdodd Exp $
*
*/
#include "opt_bus.h"
#include "opt_devfs.h"
#include "opt_simos.h"
#include <sys/param.h>
@ -42,9 +41,6 @@
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/buf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /* DEVFS */
#include <vm/vm.h>
#include <vm/pmap.h>
@ -916,22 +912,6 @@ static struct cdevsw pcicdev = {
/* bmaj */ -1
};
#ifdef DEVFS
static void *pci_devfs_token;
#endif
static void
pci_cdevinit(void *dummy)
{
cdevsw_add(&pcicdev);
#ifdef DEVFS
pci_devfs_token = devfs_add_devswf(&pcicdev, 0, DV_CHR,
UID_ROOT, GID_WHEEL, 0644, "pci");
#endif
}
SYSINIT(pcidev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+PCI_CDEV, pci_cdevinit, NULL);
#include "pci_if.h"
/*
@ -1109,9 +1089,14 @@ pci_add_children(device_t dev, int busno)
static int
pci_new_probe(device_t dev)
{
device_set_desc(dev, "PCI bus");
static int once;
device_set_desc(dev, "PCI bus");
pci_add_children(dev, device_get_unit(dev));
if (!once) {
make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci");
once++;
}
return 0;
}

View file

@ -48,7 +48,7 @@
* from: unknown origin, 386BSD 0.1
* From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp
* From Id: nlpt.c,v 1.14 1999/02/08 13:55:43 des Exp
* $Id: lpt.c,v 1.5 1999/05/31 11:24:56 phk Exp $
* $Id: lpt.c,v 1.6 1999/06/03 22:03:35 peter Exp $
*/
/*
@ -63,7 +63,6 @@
#ifdef KERNEL
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -72,9 +71,6 @@
#include <sys/kernel.h>
#include <sys/uio.h>
#include <sys/syslog.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <sys/malloc.h>
#include <machine/clock.h>
@ -136,10 +132,6 @@ struct lpt_data {
#define LP_ENABLE_EXT 0x10 /* we shall use advanced mode when possible */
u_char sc_backoff ; /* time to call lptout() again */
#ifdef DEVFS
void *devfs_token;
void *devfs_token_ctl;
#endif
};
static int nlpt = 0;
@ -438,15 +430,10 @@ lptattach(struct ppb_device *dev)
lpt_release_ppbus(sc);
#ifdef DEVFS
sc->devfs_token = devfs_add_devswf(&lpt_cdevsw,
dev->id_unit, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", dev->id_unit);
sc->devfs_token_ctl = devfs_add_devswf(&lpt_cdevsw,
dev->id_unit | LP_BYPASS, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", dev->id_unit);
#endif
make_dev(&lpt_cdevsw, dev->id_unit,
UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", dev->id_unit);
make_dev(&lpt_cdevsw, dev->id_unit | LP_BYPASS,
UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", dev->id_unit);
return (1);
}

View file

@ -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) {

View file

@ -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);
*/
}
}
}

View file

@ -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;
}

View file

@ -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 @@ siattach(id)
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);
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);
}
sc->control_token =
devfs_add_devswf(&si_cdevsw, 0x40000, DV_CHR, 0, 0, 0600,
"si_control");
#endif
make_dev(&si_cdevsw, 0x40000, 0, 0, 0600, "si_control");
return (1);
}

View file

@ -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.254 1999/08/09 10:34:55 phk Exp $
* $Id: sio.c,v 1.255 1999/08/09 11:02:38 phk 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" */
@ -70,9 +69,6 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <sys/timepps.h>
#include <isa/isareg.h>
@ -298,14 +294,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
};
#ifdef COM_ESP
@ -1124,26 +1112,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);

View file

@ -12,7 +12,7 @@
*
* Snoop stuff.
*
* $Id$
* $Id: tty_snoop.c,v 1.40 1999/06/17 23:42:44 gpalmer Exp $
*/
#include "snp.h"
@ -20,8 +20,6 @@
#if NSNP > 0
#include "opt_compat.h"
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/filio.h>
@ -34,9 +32,6 @@
#include <sys/conf.h>
#include <sys/poll.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <sys/snoop.h>
#include <sys/vnode.h>
@ -521,31 +516,17 @@ snppoll(dev, events, p)
return (revents);
}
#ifdef DEVFS
static void *snp_devfs_token[NSNP];
#endif
static int snp_devsw_installed;
static void snp_drvinit __P((void *unused));
static void
snp_drvinit(unused)
void *unused;
{
#ifdef DEVFS
int i;
#endif
if( ! snp_devsw_installed ) {
cdevsw_add(&snp_cdevsw);
snp_devsw_installed = 1;
#ifdef DEVFS
for ( i = 0 ; i < NSNP ; i++) {
snp_devfs_token[i] =
devfs_add_devswf(&snp_cdevsw, i, DV_CHR, 0, 0,
0600, "snp%d", i);
}
#endif
}
cdevsw_add(&snp_cdevsw);
for ( i = 0 ; i < NSNP ; i++)
make_dev(&snp_cdevsw, i, 0, 0, 0600, "snp%d", i);
}
SYSINIT(snpdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snp_drvinit,NULL)

View file

@ -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)

View file

@ -30,11 +30,10 @@
* skeleton produced from /usr/share/examples/drivers/make_pseudo_driver.sh
* in 3.0-980524-SNAP then hacked a bit (but probably not enough :-).
*
* $Id: streams.c,v 1.8 1999/08/01 12:51:06 newton Exp $
* $Id: streams.c,v 1.9 1999/08/04 18:53:37 green Exp $
*/
#include "streams.h" /* generated file.. defines NSTREAMS */
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h> /* SYSINIT stuff */
@ -53,9 +52,6 @@
#include <netinet/in.h>
#include <sys/proc.h>
#include <sys/uio.h>
#ifdef DEVFS
#include <sys/devfsext.h> /* DEVFS defintitions */
#endif /* DEVFS */
#include <sys/sysproto.h>
@ -129,22 +125,6 @@ static struct cdevsw streams_cdevsw = {
struct streams_softc {
struct isa_device *dev;
#ifdef DEVFS
/*
* If this ever becomes an LKM we'll want this crud so we can deallocate
* devfs entries when the module is unloaded
*/
void *devfs_ptm;
void *devfs_arp;
void *devfs_icmp;
void *devfs_ip;
void *devfs_tcp;
void *devfs_udp;
void *devfs_rawip;
void *devfs_unix_dgram;
void *devfs_unix_stream;
void *devfs_unix_ord_stream;
#endif
} ;
#define UNIT(dev) minor(dev) /* assume one minor number per unit */

View file

@ -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: syscons.h,v 1.50 1999/07/07 13:48:50 yokota Exp $
* $Id: syscons.h,v 1.51 1999/08/20 20:25:00 julian Exp $
*/
#ifndef _DEV_SYSCONS_SYSCONS_H_
@ -207,11 +207,6 @@ typedef struct sc_softc {
struct scr_stat *old_scp;
int delayed_next_scr;
/* uncontitional as you'd need to check opt_devfs in about 25 files */
void *devfs_token[MAXCONS];
void *mouse_devfs_token;
void *console_devfs_token;
char font_loading_in_progress;
char switch_in_progress;
char videoio_in_progress;

View file

@ -27,12 +27,11 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_fbsd.c,v 1.14 1999/05/30 16:51:10 phk Exp $
* $Id: coda_fbsd.c,v 1.15 1999/05/31 11:24:16 phk Exp $
*
*/
#include "vcoda.h"
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -52,13 +51,6 @@
#include <coda/coda_vnops.h>
#include <coda/coda_psdev.h>
#ifdef DEVFS
#include <sys/devfsext.h>
static void *cfs_devfs_token[NVCODA];
static void *coda_devfs_token[NVCODA];
#endif
/*
From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
Subject: Re: New 3.0 SNAPshot CDROM about ready for production..
@ -101,38 +93,12 @@ int vcdebug = 1;
static int
codadev_modevent(module_t mod, int type, void *data)
{
#ifdef DEVFS
int i;
#endif
static struct cdevsw *oldcdevsw;
switch (type) {
case MOD_LOAD:
cdevsw_add(&codadevsw);
#ifdef DEVFS
/* tmp */
#undef NVCODA
#define NVCODA 1
for (i = 0; i < NVCODA; i++) {
cfs_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"cfs%d", i);
coda_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"coda%d", i);
}
#endif
break;
case MOD_UNLOAD:
#ifdef DEVFS
for (i = 0; i < NVCODA; i++) {
devfs_remove_dev(cfs_devfs_token[i]);
devfs_remove_dev(coda_devfs_token[i]);
}
#endif
cdevsw_add(oldcdevsw);
break;
default:
break;

View file

@ -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 @@ dgbattach(dev)
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);
make_dev(&dgb_cdevsw, (unit*32)+i,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+32,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+64,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+128,
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);
make_dev(&dgb_cdevsw, (unit*32)+i+160,
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+192,
UID_UUCP, GID_DIALER, 0660, "cualD%d%c", unit, suffix);
}
hidewin(sc);

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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)

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 */

View file

@ -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);
}

View file

@ -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
}
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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*/

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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

View file

@ -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) {

View file

@ -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);
*/
}
}
}

View file

@ -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;
}

View file

@ -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 @@ siattach(id)
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);
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);
}
sc->control_token =
devfs_add_devswf(&si_cdevsw, 0x40000, DV_CHR, 0, 0, 0600,
"si_control");
#endif
make_dev(&si_cdevsw, 0x40000, 0, 0, 0600, "si_control");
return (1);
}

View file

@ -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");
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);
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 */
#if NAPM > 0
init_sound_apm(unit);
#endif

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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)

View file

@ -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);
}

View file

@ -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 @@ 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;
@ -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.

View file

@ -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;
}

View file

@ -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 */

View file

@ -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.

View file

@ -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);
}

View file

@ -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);
}

View file

@ -47,12 +47,11 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.151 1999/07/29 11:27:33 joerg Exp $
* $Id: fd.c,v 1.152 1999/08/14 11:40:41 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>
#include <isa/isareg.h>
#include <isa/fdreg.h>
@ -184,10 +179,6 @@ struct fd_data {
struct callout_handle toffhandle;
struct callout_handle tohandle;
struct devstat device_stats;
#ifdef DEVFS
void *bdevs[1 + NUMDENS + MAXPARTITIONS];
void *cdevs[1 + NUMDENS + MAXPARTITIONS];
#endif
device_t dev;
fdu_t fdu;
};
@ -915,78 +906,9 @@ static int
fd_attach(device_t dev)
{
struct fd_data *fd;
#ifdef DEVFS
int i;
int mynor;
int typemynor;
int typesize;
#endif
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);
for (i = 1; i < 1 + NUMDENS; i++) {
/*
* XXX this and the lookup in Fdopen() should be
* data driven.
*/
switch (fd->type) {
case FD_360:
if (i != FD_360)
continue;
break;
case FD_720:
if (i != FD_720 && i != FD_800 && i != FD_820)
continue;
break;
case FD_1200:
if (i != FD_360 && i != FD_720 && i != FD_800
&& i != FD_820 && i != FD_1200
&& i != FD_1440 && i != FD_1480)
continue;
break;
case FD_1440:
if (i != FD_720 && i != FD_800 && i != FD_820
&& i != FD_1200 && i != FD_1440
&& i != FD_1480 && i != FD_1720)
continue;
break;
}
typesize = fd_types[i - 1].size / 2;
/*
* XXX all these conversions give bloated code and
* confusing names.
*/
if (typesize == 1476)
typesize = 1480;
if (typesize == 1722)
typesize = 1720;
typemynor = mynor | i;
fd->bdevs[i] =
devfs_add_devswf(&fd_cdevsw, typemynor, DV_BLK,
UID_ROOT, GID_OPERATOR, 0640,
"fd%d.%d", fd->fdu, typesize);
fd->cdevs[i] =
devfs_add_devswf(&fd_cdevsw, typemynor, DV_CHR,
UID_ROOT, GID_OPERATOR, 0640,
"rfd%d.%d", fd->fdu, typesize);
}
for (i = 0; i < MAXPARTITIONS; i++) {
fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0],
"fd%d%c", fd->fdu, 'a' + i);
fd->cdevs[1 + NUMDENS + i] =
devfs_makelink(fd->cdevs[0],
"rfd%d%c", fd->fdu, 'a' + i);
}
#endif /* DEVFS */
/*
* Export the drive to the devstat interface.
*/
@ -1010,11 +932,6 @@ static int yeattach(struct isa_device *dev)
fdu_t fdu;
fd_p fd;
int st0, st3, i;
#ifdef DEVFS
int mynor;
int typemynor;
int typesize;
#endif
fdc->fdcu = fdcu;
/*
* the FDC_PCMCIA flag is used to to indicate special PIO is used
@ -1090,41 +1007,6 @@ static int yeattach(struct isa_device *dev)
printf("fdc%d: 1.44MB 3.5in PCMCIA\n", fdcu);
fd->type = FD_1440;
#ifdef DEVFS
mynor = fdcu << 6;
fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK,
UID_ROOT, GID_OPERATOR, 0640,
"fd%d", fdu);
fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR,
UID_ROOT, GID_OPERATOR, 0640,
"rfd%d", fdu);
/*
* XXX this and the lookup in Fdopen() should be
* data driven.
*/
typemynor = mynor | FD_1440;
typesize = fd_types[FD_1440 - 1].size / 2;
/*
* XXX all these conversions give bloated code and
* confusing names.
*/
if (typesize == 1476)
typesize = 1480;
if (typesize == 1722)
typesize = 1720;
fd->bdevs[FD_1440] = devfs_add_devswf(&fd_cdevsw, typemynor,
DV_BLK, UID_ROOT, GID_OPERATOR,
0640, "fd%d.%d", fdu, typesize);
fd->cdevs[FD_1440] = devfs_add_devswf(&fd_cdevsw, typemynor,
DV_CHR, UID_ROOT, GID_OPERATOR,
0640,"rfd%d.%d", fdu, typesize);
for (i = 0; i < MAXPARTITIONS; i++) {
fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0],
"fd%d%c", fdu, 'a' + i);
fd->cdevs[1 + NUMDENS + i] = devfs_makelink(fd->cdevs[0],
"rfd%d%c", fdu, 'a' + i);
}
#endif /* DEVFS */
return (1);
}
#endif

View file

@ -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;
}

View file

@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: psm.c,v 1.15 1999/08/17 12:14:13 yokota Exp $
* $Id: psm.c,v 1.16 1999/08/22 06:11:52 yokota Exp $
*/
/*
@ -65,7 +65,6 @@
#ifdef __i386__
#include "apm.h"
#endif
#include "opt_devfs.h"
#include "opt_psm.h"
#if NPSM > 0
@ -81,9 +80,6 @@
#include <sys/malloc.h>
#include <machine/bus.h>
#include <sys/rman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <sys/select.h>
#include <sys/uio.h>
@ -181,10 +177,6 @@ struct psm_softc { /* Driver status information */
int button; /* the latest button state */
int xold; /* previous absolute X position */
int yold; /* previous absolute Y position */
#ifdef DEVFS
void *devfs_token;
void *b_devfs_token;
#endif
#ifdef PSM_HOOKAPM
struct apmhook resumehook;
#endif
@ -1094,14 +1086,8 @@ psmattach(device_t dev)
sc->state = PSM_VALID;
/* Done */
#ifdef DEVFS
sc->devfs_token =
devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, FALSE),
DV_CHR, 0, 0, 0666, "psm%d", unit);
sc->b_devfs_token =
devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, TRUE),
DV_CHR, 0, 0, 0666, "bpsm%d", unit);
#endif /* DEVFS */
make_dev(&psm_cdevsw, PSM_MKMINOR(unit, FALSE), 0, 0, 0666, "psm%d", unit);
make_dev(&psm_cdevsw, PSM_MKMINOR(unit, TRUE), 0, 0, 0666, "bpsm%d", unit);
#ifdef PSM_HOOKAPM
sc->resumehook.ah_name = "PS/2 mouse";

View file

@ -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.254 1999/08/09 10:34:55 phk Exp $
* $Id: sio.c,v 1.255 1999/08/09 11:02:38 phk 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" */
@ -70,9 +69,6 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <sys/timepps.h>
#include <isa/isareg.h>
@ -298,14 +294,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
};
#ifdef COM_ESP
@ -1124,26 +1112,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);

View file

@ -39,10 +39,9 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
* $Id: init_main.c,v 1.123 1999/06/30 15:33:32 peter Exp $
* $Id: init_main.c,v 1.124 1999/07/01 13:21:36 peter Exp $
*/
#include "opt_devfs.h"
#include "opt_init_path.h"
#include <sys/param.h>

View file

@ -30,11 +30,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_conf.c,v 1.58 1999/08/17 20:25:50 billf Exp $
* $Id: kern_conf.c,v 1.59 1999/08/20 20:24:59 julian Exp $
*/
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
@ -44,10 +42,6 @@
#include <sys/vnode.h>
#include <sys/queue.h>
#include <machine/stdarg.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /* DEVFS */
#define cdevsw_ALLOCSTART (NUMCDEVSW/2)
@ -64,6 +58,8 @@ static struct specinfo devt_stash[DEVT_STASH];
static SLIST_HEAD(devt_hash_head, specinfo) dev_hash[DEVT_HASH];
devfs_create_t *devfs_create_hook;
/*
* Routine to convert from character to block device number.
*
@ -239,9 +235,6 @@ makedev(int x, int y)
}
bzero(si, sizeof(*si));
si->si_udev = udev;
si->si_bsize_phys = DEV_BSIZE;
si->si_bsize_best = BLKDEV_IOSIZE;
si->si_bsize_max = MAXBSIZE;
if (y > 256)
sprintf(si->si_name, "#%d/0x%x", x, y);
else
@ -313,17 +306,8 @@ make_dev(struct cdevsw *devsw, int minor, uid_t uid, gid_t gid, int perms, char
va_end(ap);
dev->si_devsw = devsw;
#ifdef DEVFS
dev->si_devfs = devfs_add_devswf(devsw, minor, DV_CHR,
uid, gid, perms, dev->si_name);
/* XXX HACK .. name may not start in 'r' */
if ((devsw->d_bmaj != -1)
&& (*dev->si_name == 'r')
&& ((devsw->d_flags & D_TYPEMASK) == D_DISK)) {
dev->si_devfs = devfs_add_devswf(devsw, minor, DV_BLK,
uid, gid, perms, dev->si_name + 1);
}
#endif /* DEVFS */
if (devfs_create_hook)
devfs_create_hook(dev, uid, gid, perms);
return (dev);
}

View file

@ -36,12 +36,10 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
* $Id: kern_descrip.c,v 1.64 1999/06/07 20:37:27 msmith Exp $
* $Id: kern_descrip.c,v 1.65 1999/08/04 18:53:44 green Exp $
*/
#include "opt_compat.h"
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
@ -65,10 +63,6 @@
#include <vm/vm.h>
#include <vm/vm_extern.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
static MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table");
MALLOC_DEFINE(M_FILE, "file", "Open file structure");
static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures");
@ -1292,43 +1286,18 @@ SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, CTLFLAG_RW,
SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW,
&maxfiles, 0, "Maximum number of files");
static int fildesc_devsw_installed;
#ifdef DEVFS
static void *devfs_token_stdin;
static void *devfs_token_stdout;
static void *devfs_token_stderr;
static void *devfs_token_fildesc[NUMFDESC];
#endif
static void fildesc_drvinit(void *unused)
static void
fildesc_drvinit(void *unused)
{
#ifdef DEVFS
int fd;
#endif
if( ! fildesc_devsw_installed ) {
cdevsw_add(&fildesc_cdevsw);
fildesc_devsw_installed = 1;
#ifdef DEVFS
for (fd = 0; fd < NUMFDESC; fd++)
devfs_token_fildesc[fd] =
devfs_add_devswf(&fildesc_cdevsw, fd, DV_CHR,
UID_BIN, GID_BIN, 0666,
"fd/%d", fd);
devfs_token_stdin =
devfs_add_devswf(&fildesc_cdevsw, 0, DV_CHR,
UID_ROOT, GID_WHEEL, 0666,
"stdin");
devfs_token_stdout =
devfs_add_devswf(&fildesc_cdevsw, 1, DV_CHR,
UID_ROOT, GID_WHEEL, 0666,
"stdout");
devfs_token_stderr =
devfs_add_devswf(&fildesc_cdevsw, 2, DV_CHR,
UID_ROOT, GID_WHEEL, 0666,
"stderr");
#endif
}
cdevsw_add(&fildesc_cdevsw);
for (fd = 0; fd < NUMFDESC; fd++)
make_dev(&fildesc_cdevsw, fd,
UID_BIN, GID_BIN, 0666, "fd/%d", fd);
make_dev(&fildesc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "stdin");
make_dev(&fildesc_cdevsw, 1, UID_ROOT, GID_WHEEL, 0666, "stdout");
make_dev(&fildesc_cdevsw, 2, UID_ROOT, GID_WHEEL, 0666, "stderr");
}
struct fileops badfileops = {

View file

@ -43,7 +43,7 @@
* from: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: subr_diskslice.c,v 1.65 1999/06/21 03:48:16 grog Exp $
* $Id: subr_diskslice.c,v 1.66 1999/08/14 11:40:43 phk Exp $
*/
#include "opt_devfs.h"
@ -715,6 +715,10 @@ dsopen(dname, dev, mode, flags, sspp, lp)
struct diskslices *ssp;
int unit;
dev->si_bsize_phys = DEV_BSIZE;
dev->si_bsize_best = BLKDEV_IOSIZE;
dev->si_bsize_max = MAXBSIZE;
unit = dkunit(dev);
if (lp->d_secsize % DEV_BSIZE) {
printf("%s%d: invalid sector size %lu\n", dname, unit,

View file

@ -31,15 +31,13 @@
* SUCH DAMAGE.
*
* @(#)subr_log.c 8.1 (Berkeley) 6/10/93
* $Id: subr_log.c,v 1.35 1999/05/30 16:52:56 phk Exp $
* $Id: subr_log.c,v 1.36 1999/05/31 11:27:35 phk Exp $
*/
/*
* Error log buffer for kernel printf's.
*/
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -52,9 +50,6 @@
#include <sys/kernel.h>
#include <sys/poll.h>
#include <sys/filedesc.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#define LOG_RDPRI (PZERO + 1)
@ -264,26 +259,14 @@ logioctl(dev, com, data, flag, p)
return (0);
}
static int log_devsw_installed;
#ifdef DEVFS
static void *log_devfs_token;
#endif
static void log_drvinit __P((void *unused));
static void
log_drvinit(unused)
void *unused;
{
if( ! log_devsw_installed ) {
cdevsw_add(&log_cdevsw);
log_devsw_installed = 1;
#ifdef DEVFS
log_devfs_token = devfs_add_devswf(&log_cdevsw, 0, DV_CHR,
UID_ROOT, GID_WHEEL, 0600,
"klog");
#endif
}
make_dev(&log_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "klog");
}
SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,log_drvinit,NULL)

View file

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_pty.c 8.4 (Berkeley) 2/20/95
* $Id: tty_pty.c,v 1.64 1999/08/17 23:08:51 julian Exp $
* $Id: tty_pty.c,v 1.65 1999/08/20 20:25:00 julian Exp $
*/
/*
@ -40,8 +40,6 @@
*/
#include "pty.h" /* XXX */
#include "opt_compat.h"
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
@ -185,10 +183,9 @@ ptsopen(dev, flag, devtype, p)
dev_t nextdev;
/*
* XXX: Gross hack for DEVFS:
* If we openned this device, ensure we have the
* next ready in the DEVFS (up to 256 of them).
* XXX probably a more efficient way of know if the next one has
* been made already would be to just keep track..
* next one too, so people can open it.
*/
minr = lminor(dev);
if (minr < 255) {
@ -837,14 +834,10 @@ static void
ptc_drvinit(unused)
void *unused;
{
static int ptc_devsw_installed;
if( ! ptc_devsw_installed ) {
cdevsw_add(&pts_cdevsw);
cdevsw_add(&ptc_cdevsw);
ptc_devsw_installed = 1;
}
ptyinit(0); /* Add the first pty into the system.. prime the pump */
cdevsw_add(&pts_cdevsw);
cdevsw_add(&ptc_cdevsw);
/* XXX: Gross hack for DEVFS */
ptyinit(0);
}
SYSINIT(ptcdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR_C,ptc_drvinit,NULL)

View file

@ -12,7 +12,7 @@
*
* Snoop stuff.
*
* $Id$
* $Id: tty_snoop.c,v 1.40 1999/06/17 23:42:44 gpalmer Exp $
*/
#include "snp.h"
@ -20,8 +20,6 @@
#if NSNP > 0
#include "opt_compat.h"
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/filio.h>
@ -34,9 +32,6 @@
#include <sys/conf.h>
#include <sys/poll.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <sys/snoop.h>
#include <sys/vnode.h>
@ -521,31 +516,17 @@ snppoll(dev, events, p)
return (revents);
}
#ifdef DEVFS
static void *snp_devfs_token[NSNP];
#endif
static int snp_devsw_installed;
static void snp_drvinit __P((void *unused));
static void
snp_drvinit(unused)
void *unused;
{
#ifdef DEVFS
int i;
#endif
if( ! snp_devsw_installed ) {
cdevsw_add(&snp_cdevsw);
snp_devsw_installed = 1;
#ifdef DEVFS
for ( i = 0 ; i < NSNP ; i++) {
snp_devfs_token[i] =
devfs_add_devswf(&snp_cdevsw, i, DV_CHR, 0, 0,
0600, "snp%d", i);
}
#endif
}
cdevsw_add(&snp_cdevsw);
for ( i = 0 ; i < NSNP ; i++)
make_dev(&snp_cdevsw, i, 0, 0, 0600, "snp%d", i);
}
SYSINIT(snpdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snp_drvinit,NULL)

View file

@ -31,15 +31,13 @@
* SUCH DAMAGE.
*
* @(#)tty_tty.c 8.2 (Berkeley) 9/23/93
* $Id: tty_tty.c,v 1.26 1999/05/30 16:53:00 phk Exp $
* $Id: tty_tty.c,v 1.27 1999/05/31 11:27:41 phk Exp $
*/
/*
* Indirect driver for controlling tty.
*/
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -48,9 +46,6 @@
#include <sys/ttycom.h>
#include <sys/vnode.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
static d_open_t cttyopen;
static d_read_t cttyread;
@ -193,26 +188,13 @@ cttypoll(dev, events, p)
return (VOP_POLL(ttyvp, events, p->p_ucred, p));
}
static int ctty_devsw_installed;
#ifdef DEVFS
static void *ctty_devfs_token;
#endif
static void ctty_drvinit __P((void *unused));
static void
ctty_drvinit(unused)
void *unused;
{
if( ! ctty_devsw_installed ) {
cdevsw_add(&ctty_cdevsw);
ctty_devsw_installed = 1;
#ifdef DEVFS
ctty_devfs_token =
devfs_add_devswf(&ctty_cdevsw, 0, DV_CHR, 0, 0,
0666, "tty");
#endif
}
make_dev(&ctty_cdevsw, 0, 0, 0, 0666, "tty");
}
SYSINIT(cttydev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,ctty_drvinit,NULL)

View file

@ -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;
}

View file

@ -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.

View file

@ -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);
}

View file

@ -28,10 +28,9 @@
* (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: pccard.c,v 1.80 1999/05/31 11:28:48 phk Exp $
* $Id: pccard.c,v 1.81 1999/08/01 18:12:50 imp Exp $
*/
#include "opt_devfs.h"
#include "opt_pcic.h"
#include <sys/param.h>
@ -42,9 +41,6 @@
#include <sys/select.h>
#include <sys/sysctl.h>
#include <sys/conf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <sys/uio.h>
#include <sys/poll.h>
#include <sys/interrupt.h>
@ -477,10 +473,7 @@ pccard_alloc_slot(struct slot_ctrl *ctrl)
MALLOC(slt, struct slot *, sizeof(*slt), M_DEVBUF, M_WAITOK);
bzero(slt, sizeof(*slt));
#ifdef DEVFS
slt->devfs_token = devfs_add_devswf(&crd_cdevsw,
slotno, DV_CHR, 0, 0, 0600, "card%d", slotno);
#endif
make_dev(&crd_cdevsw, slotno, 0, 0, 0600, "card%d", slotno);
if (ctrl->extra) {
MALLOC(slt->cdata, void *, ctrl->extra, M_DEVBUF, M_WAITOK);
bzero(slt->cdata, ctrl->extra);

View file

@ -149,10 +149,6 @@ struct slot {
struct slot_ctrl *ctrl; /* Per-controller data */
void *cdata; /* Controller specific data */
int pwr_off_pending;/* Power status of slot */
#ifdef DEVFS
void *devfs_token;
#endif /* DEVFS*/
struct slot *next; /* Master list */
};

View file

@ -1,4 +1,4 @@
/* $Id: brooktree848.c,v 1.85 1999/06/12 14:54:54 roger Exp $ */
/* $Id: brooktree848.c,v 1.89 1999/07/12 15:51:48 roger Exp $ */
/* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards.
The Brooktree BT848 Driver driver is based upon Mark Tinguely and
Jim Lowe's driver for the Matrox Meteor PCI card . The
@ -444,7 +444,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
#ifdef __FreeBSD__
#include "bktr.h"
#include "opt_bktr.h"
#include "opt_devfs.h"
#include "pci.h"
#endif /* __FreeBSD__ */
@ -485,10 +484,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
#define NSMBUS 0
#endif
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /* DEVFS */
#if (__FreeBSD_version >=400000) || (NSMBUS > 0)
#include <sys/bus.h> /* used by smbus and newbus */
#endif
@ -6961,13 +6956,9 @@ bktr_attach( device_t dev )
/* call the common attach code */
common_bktr_attach( bktr, unit, fun, rev );
#ifdef DEVFS
/* XXX This just throw away the token, which should probably be fixed when
DEVFS is finally made really operational. */
devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit);
#endif /* DEVFS */
make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit);
make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit);
make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit);
return 0;
@ -7473,13 +7464,9 @@ bktr_attach( pcici_t tag, int unit )
/* call the common attach code */
common_bktr_attach( bktr, unit, fun, rev );
#ifdef DEVFS
/* XXX This just throw away the token, which should probably be fixed when
DEVFS is finally made really operational. */
devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit);
devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit);
#endif /* DEVFS */
make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit);
make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit);
make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit);
}

View file

@ -32,9 +32,8 @@
* dptpci.c: PCI Bus Attachment for DPT SCSI HBAs
*/
#ident "$Id: dpt_pci.c,v 1.13 1999/05/09 17:06:44 peter Exp $"
#ident "$Id: dpt_pci.c,v 1.14 1999/08/16 01:52:20 gibbs Exp $"
#include "opt_devfs.h"
#include "opt_dpt.h"
#include <sys/param.h>

View file

@ -147,7 +147,6 @@
#include "meteor.h"
#include "opt_devfs.h"
#include "opt_meteor.h"
#include <sys/param.h>
@ -156,9 +155,6 @@
#include <sys/kernel.h>
#include <sys/signalvar.h>
#include <sys/mman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /* DEVFS */
#include <sys/uio.h>
#if defined(METEOR_FreeBSD_210)
@ -1126,10 +1122,7 @@ met_attach(pcici_t tag, int unit)
mtr->flags |= METEOR_INITALIZED | METEOR_AUTOMODE | METEOR_DEV0 |
METEOR_RGB16;
#ifdef DEVFS
mtr->devfs_token = devfs_add_devswf(&meteor_cdevsw, unit,
DV_CHR, 0, 0, 0644, "meteor");
#endif
make_dev(&meteor_cdevsw, unit, 0, 0, 0644, "meteor");
}
#define UNIT(x) ((x) & 0x07)

View file

@ -238,9 +238,6 @@ typedef struct meteor_softc {
u_char pcf_i2c[NUM_PCF8574_I2C_REGS]; /* PCF8574 register values */
u_char bt254_reg[NUM_BT254_REGS]; /* BT254 register values */
u_short fps; /* frames per second */
#ifdef DEVFS
void *devfs_token;
#endif
#ifdef METEOR_TEST_VIDEO
struct meteor_video video;
#endif

View file

@ -23,13 +23,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: pci.c,v 1.113 1999/07/28 07:57:47 dfr Exp $
* $Id: pci.c,v 1.114 1999/07/29 01:03:03 mdodd Exp $
*
*/
#include "opt_bus.h"
#include "opt_devfs.h"
#include "opt_simos.h"
#include <sys/param.h>
@ -42,9 +41,6 @@
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/buf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /* DEVFS */
#include <vm/vm.h>
#include <vm/pmap.h>
@ -916,22 +912,6 @@ static struct cdevsw pcicdev = {
/* bmaj */ -1
};
#ifdef DEVFS
static void *pci_devfs_token;
#endif
static void
pci_cdevinit(void *dummy)
{
cdevsw_add(&pcicdev);
#ifdef DEVFS
pci_devfs_token = devfs_add_devswf(&pcicdev, 0, DV_CHR,
UID_ROOT, GID_WHEEL, 0644, "pci");
#endif
}
SYSINIT(pcidev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+PCI_CDEV, pci_cdevinit, NULL);
#include "pci_if.h"
/*
@ -1109,9 +1089,14 @@ pci_add_children(device_t dev, int busno)
static int
pci_new_probe(device_t dev)
{
device_set_desc(dev, "PCI bus");
static int once;
device_set_desc(dev, "PCI bus");
pci_add_children(dev, device_get_unit(dev));
if (!once) {
make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci");
once++;
}
return 0;
}

View file

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: xrpu.c,v 1.14 1999/07/03 08:23:00 phk Exp $
* $Id: xrpu.c,v 1.15 1999/07/13 08:15:22 phk Exp $
*
* A very simple device driver for PCI cards based on Xilinx 6200 series
* FPGA/RPU devices. Current Functionality is to allow you to open and
@ -17,8 +17,6 @@
*
*/
#include "opt_devfs.h"
#include "xrpu.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -26,9 +24,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/timepps.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#include <sys/xrpuio.h>
#include <pci/pcireg.h>
#include <pci/pcivar.h>
@ -184,10 +179,8 @@ xrpu_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *pr)
if (xt->xt_pps[i].xt_addr_assert == 0
&& xt->xt_pps[i].xt_addr_clear == 0)
continue;
#ifdef DEVFS
devfs_add_devswf(&xrpu_cdevsw, (i+1)<<16, DV_CHR, UID_ROOT, GID_WHEEL,
0600, "xpps%d", i);
#endif
make_dev(&xrpu_cdevsw, (i+1)<<16,
UID_ROOT, GID_WHEEL, 0600, "xpps%d", i);
sc->pps[i].ppscap = 0;
if (xt->xt_pps[i].xt_addr_assert) {
sc->assert[i] = sc->virbase62 + xt->xt_pps[i].xt_addr_assert;
@ -263,8 +256,5 @@ xrpu_attach (pcici_t tag, int unit)
(u_long)sc->physbase, (u_long)sc->virbase);
#ifdef DEVFS
devfs_add_devswf(&xrpu_cdevsw, 0, DV_CHR, UID_ROOT, GID_WHEEL, 0600,
"xrpu%d", unit);
#endif
make_dev(&xrpu_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "xrpu%d", unit);
}

View file

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
* $Id: conf.h,v 1.75 1999/08/17 20:25:48 billf Exp $
* $Id: conf.h,v 1.76 1999/08/20 20:24:59 julian Exp $
*/
#ifndef _SYS_CONF_H_
@ -50,10 +50,6 @@ struct tty;
struct vnode;
struct specinfo {
struct mount *si_mountpoint;
int si_bsize_phys; /* minimum physical block size */
int si_bsize_best; /* optimal block size / VBLK */
int si_bsize_max; /* maximum block size */
udev_t si_udev;
SLIST_ENTRY(specinfo) si_hash;
@ -66,10 +62,20 @@ struct specinfo {
struct {
struct tty *__sit_tty;
} __si_tty;
struct {
struct mount *__sid_mountpoint;
int __sid_bsize_phys; /* min physical block size */
int __sid_bsize_best; /* optimal block size */
int __sid_bsize_max; /* maximum block size */
} __si_disk;
} __si_u;
};
#define si_tty_tty __si_u.__si_tty.__sit_tty
#define si_mountpoint __si_u.__si_disk.__sid_mountpoint
#define si_bsize_phys __si_u.__si_disk.__sid_bsize_phys
#define si_bsize_best __si_u.__si_disk.__sid_bsize_best
#define si_bsize_max __si_u.__si_disk.__sid_bsize_max
/*
* Exported shorthand
@ -118,6 +124,9 @@ typedef int l_rint_t __P((int c, struct tty *tp));
typedef int l_start_t __P((struct tty *tp));
typedef int l_modem_t __P((struct tty *tp, int flag));
/* This is type of the function DEVFS uses to hook into the kernel with */
typedef void devfs_create_t __P((dev_t dev, uid_t uid, gid_t gid, int perms));
/*
* XXX: The dummy argument can be used to do what strategy1() never
* did anywhere: Create a per device flag to lock the device during
@ -272,6 +281,8 @@ dev_t make_dev __P((struct cdevsw *devsw, int minor, uid_t uid, gid_t gid, int p
int lminor __P((dev_t dev));
void setconf __P((void));
extern devfs_create_t *devfs_create_hook;
/*
* XXX: This included for when DEVFS resurfaces
*/

Some files were not shown because too many files have changed in this diff Show more