- add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately - create more helper macros: . cdev__xyz_init(c,n), such as cdev__ocri_init() for /* open, close, read, ioctl */, etc. . cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out method `R' and the comments now read /* xxx (read) yyy */ instead . cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t as well - use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should always DTRT WRT returning a valid result. (a few devices previously incorrectly returned ENODEV) - use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty == 0, because it doesn't matter if dev_type_stop isn't implemented in that case, and it allows the use of the cdev__xyz_init macros. certain ports (sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few drivers, whereas everything else uses enodev - ensure that the comments are accurate WRT the behaviour of a given entry
This commit is contained in:
parent
7e28d29b32
commit
20ba07f2fe
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.8 2001/03/21 23:42:14 lukem Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.9 2001/03/26 12:33:22 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Bernd Ernesti. All rights reserved.
|
||||
@ -38,25 +38,8 @@ cdev_decl(ctty);
|
||||
bdev_decl(fd);
|
||||
cdev_decl(fd);
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_grf_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_view_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, read, write, ioctl -- XXX should be a generic device */
|
||||
#define cdev_par_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev }
|
||||
#define cdev_par_init(c,n) cdev__ocrwi_init(c,n)
|
||||
|
||||
cdev_decl(ms);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.2 2001/03/21 23:42:14 lukem Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.3 2001/03/26 12:33:23 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Bernd Ernesti. All rights reserved.
|
||||
@ -38,26 +38,6 @@ cdev_decl(ctty);
|
||||
bdev_decl(fd);
|
||||
cdev_decl(fd);
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_grf_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_view_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, read, write, ioctl -- XXX should be a generic device */
|
||||
#define cdev_par_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(ms);
|
||||
|
||||
cdev_decl(grf);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.18 2001/03/21 23:42:15 lukem Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.19 2001/03/26 12:33:23 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -54,51 +54,27 @@ cdev_decl(raid);
|
||||
|
||||
/* Character device declarations */
|
||||
|
||||
/* open, close, read, write, ioctl, tty, mmap */
|
||||
#define cdev_physcon_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, dev_init(c,n,mmap), 0 }
|
||||
/* open, close, read, write, ioctl, tty, mmap -- XXX should be a tty */
|
||||
#define cdev_physcon_init(c,n) cdev__ttym_init(c,n,0)
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_beep_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, 0 }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_kbd_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, 0 }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_vidcvid_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, \
|
||||
0, seltrue, dev_init(c,n,mmap), 0 }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_iic_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, 0 }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_rtc_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, 0 }
|
||||
/* open, close, ioctl */
|
||||
#define cdev_beep_init(c,n) cdev__oci_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_prof_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_kbd_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
/* open, close, ioctl, mmap */
|
||||
#define cdev_vidcvid_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_init(c,n,mmap), 0 }
|
||||
|
||||
/* open, close, read, write, ioctl */
|
||||
#define cdev_iic_init(c,n) cdev__ocrwi_init(c,n)
|
||||
#define cdev_rtc_init(c,n) cdev__ocrwi_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_prof_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
#define mmread mmrw
|
||||
#define mmwrite mmrw
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.45 2001/03/21 22:25:54 lukem Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.46 2001/03/26 12:33:23 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
#define bdev_md_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,strategy), \
|
||||
dev_init(c,n,ioctl), (dev_type_dump((*))) enxio, dev_size_init(c,n), 0 }
|
||||
dev_init(c,n,ioctl), dev_noimpl(dump,enxio), dev_size_init(c,n), 0 }
|
||||
|
||||
#include "vnd.h"
|
||||
bdev_decl(vnd);
|
||||
@ -96,47 +96,18 @@ struct bdevsw bdevsw[] =
|
||||
};
|
||||
int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_grf_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, (dev_type_tty((*))) nullop, \
|
||||
dev_init(c,n,poll), dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_view_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, (dev_type_tty((*))) nullop, \
|
||||
dev_init(c,n,poll), dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_lp_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), \
|
||||
(dev_type_read((*))) enodev, dev_init(c,n,write), \
|
||||
dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, 0}
|
||||
#define cdev_lp_init(c,n) cdev__ocwi_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_ss_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_ss_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
/* open, close, read, write */
|
||||
#define cdev_rtc_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write),(dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_rtc_init(c,n) cdev__ocrw_init(c,n)
|
||||
|
||||
/* open, close, read, write, ioctl, mmap */
|
||||
#define cdev_et_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
dev_init(c,n,mmap) }
|
||||
#define cdev_et_init(c,n) cdev__ocrwim_init(c,n)
|
||||
#define cdev_leo_init(c,n) cdev__ocrwim_init(c,n)
|
||||
|
||||
#include "i4b.h"
|
||||
#include "i4bctl.h"
|
||||
@ -149,13 +120,6 @@ cdev_decl(i4btrc);
|
||||
cdev_decl(i4brbch);
|
||||
cdev_decl(i4btel);
|
||||
|
||||
/* open, close, read, write, ioctl, mmap */
|
||||
#define cdev_leo_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
#include "audio.h"
|
||||
#include "bpfilter.h"
|
||||
#include "ch.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.1 2000/12/11 18:19:14 marcus Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.2 2001/03/26 12:33:23 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
|
||||
@ -38,10 +38,4 @@ cdev_decl(mm);
|
||||
bdev_decl(fd);
|
||||
cdev_decl(fd);
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_wdog_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(wdog);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.2 2000/02/24 17:07:36 msaitoh Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.3 2001/03/26 12:33:23 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
|
||||
@ -38,10 +38,4 @@ cdev_decl(mm);
|
||||
bdev_decl(fd);
|
||||
cdev_decl(fd);
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_wdog_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(wdog);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.45 1999/04/19 21:22:58 kleink Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.46 2001/03/26 12:33:24 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
@ -86,25 +86,14 @@ struct bdevsw bdevsw[] =
|
||||
};
|
||||
int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_grf_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, read, write, ioctl -- XXX should be a generic device */
|
||||
#define cdev_ppi_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
|
||||
0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev }
|
||||
#define cdev_ppi_init(c,n) cdev__ocrwi_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl, poll, mmap -- XXX should be a map device */
|
||||
/* open, close, read, (write), ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_hil_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
dev_noimpl(write,nullop), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, dev_init(c,n,poll), dev_init(c,n,mmap) }
|
||||
|
||||
cdev_decl(cn);
|
||||
cdev_decl(ctty);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.4 2001/03/21 23:42:15 lukem Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.5 2001/03/26 12:33:24 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -54,18 +54,11 @@ cdev_decl(raid);
|
||||
|
||||
/* Character device declarations */
|
||||
|
||||
/* open, close, read, write, ioctl, tty, mmap */
|
||||
#define cdev_physcon_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, dev_init(c,n,mmap), 0 }
|
||||
/* open, close, read, write, ioctl, stop, tty, mmap -- XXX should be tty? */
|
||||
#define cdev_physcon_init(c,n) cdev__ttym_init(c,n,0)
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_prof_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_prof_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
#define mmread mmrw
|
||||
#define mmwrite mmrw
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.1 2001/01/17 05:21:50 itojun Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.2 2001/03/26 12:33:24 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
|
||||
@ -38,10 +38,4 @@ cdev_decl(mm);
|
||||
bdev_decl(fd);
|
||||
cdev_decl(fd);
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_wdog_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(wdog);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.139 2001/03/21 22:25:55 lukem Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.140 2001/03/26 12:33:24 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -222,8 +222,8 @@ cdev_decl(i4btel);
|
||||
/* open, close, read, write, ioctl, mmap */
|
||||
#define cdev_vmegen_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, (dev_type_poll((*))) enodev, dev_init(c,n,mmap) }
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_init(c,n,mmap) }
|
||||
|
||||
#include "vmegeneric.h"
|
||||
cdev_decl(vmegeneric);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.2 2000/02/24 17:07:35 msaitoh Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.3 2001/03/26 12:33:25 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
|
||||
@ -38,10 +38,4 @@ cdev_decl(mm);
|
||||
bdev_decl(fd);
|
||||
cdev_decl(fd);
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_wdog_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(wdog);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.8 2000/11/15 00:39:31 matt Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.9 2001/03/26 12:33:25 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -79,11 +79,8 @@ cdev_decl(openfirm);
|
||||
|
||||
cdev_decl(raid);
|
||||
|
||||
#define cdev_rtc_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), \
|
||||
dev_init(c,n,read), dev_init(c,n,write), \
|
||||
(dev_type_ioctl((*))) enodev, (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
/* open, close, read, write */
|
||||
#define cdev_rtc_init(c,n) cdev__ocrw_init(c,n)
|
||||
|
||||
struct cdevsw cdevsw[] = {
|
||||
cdev_cn_init(1,cn), /* 0: virtual console */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.40 2001/02/11 17:56:43 tsutsui Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.41 2001/03/26 12:33:25 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -174,14 +174,9 @@ cdev_decl(scc);
|
||||
cdev_decl(tz);
|
||||
|
||||
/* a framebuffer with an attached mouse: */
|
||||
|
||||
/* open, close, ioctl, poll, mmap */
|
||||
|
||||
#define cdev_fbm_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
#define cdev_fbm_init(c,n) cdev__ocipm_init(c,n)
|
||||
|
||||
struct cdevsw cdevsw[] =
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.17 1999/12/15 08:01:00 garbled Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.18 2001/03/26 12:33:25 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -40,20 +40,10 @@
|
||||
#define mmwrite mmrw
|
||||
cdev_decl(mm);
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_openprom_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(openprom);
|
||||
|
||||
#define cdev_tctrl_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
/* open, close, ioctl, poll */
|
||||
#define cdev_tctrl_init(c,n) cdev__ocip_init(c,n)
|
||||
|
||||
cdev_decl(tctrl);
|
||||
|
||||
@ -67,12 +57,6 @@ cdev_decl(fd);
|
||||
|
||||
cdev_decl(fb);
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev_gen_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(ms);
|
||||
|
||||
cdev_decl(kbd);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.68 2001/03/21 22:25:56 lukem Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.69 2001/03/26 12:33:25 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -216,7 +216,7 @@ struct cdevsw cdevsw[] =
|
||||
cdev_notdef(), /* 66 */
|
||||
cdev_fb_init(NCGSIX,cgsix), /* 67: /dev/cgsix */
|
||||
cdev_notdef(), /* 68 */
|
||||
cdev_gen_init(NAUDIO,audio), /* 69: /dev/audio */
|
||||
cdev__ocrwip_init(NAUDIO,audio), /* 69: /dev/audio */
|
||||
cdev_openprom_init(1,openprom), /* 70: /dev/openprom */
|
||||
cdev_tctrl_init(NTCTRL,tctrl), /* 71: /dev/tctrl */
|
||||
cdev_i4b_init(NI4B, i4b), /* 72: i4b main device */
|
||||
@ -248,13 +248,13 @@ struct cdevsw cdevsw[] =
|
||||
cdev_notdef(), /* 98 */
|
||||
cdev_fb_init(NCGFOURTEEN,cgfourteen), /* 99: /dev/cgfourteen */
|
||||
cdev_tty_init(NMTTY,mtty), /* 100 */
|
||||
cdev_gen_init(NMBPP,mbpp), /* 101 */
|
||||
cdev__ocrwip_init(NMBPP,mbpp), /* 101 */
|
||||
cdev_notdef(), /* 102 */
|
||||
cdev_notdef(), /* 103 */
|
||||
cdev_notdef(), /* 104 */
|
||||
cdev_bpftun_init(NBPFILTER,bpf),/* 105: packet filter */
|
||||
cdev_notdef(), /* 106 */
|
||||
cdev_gen_init(NBPP,bpp), /* 107: on-board parallel port */
|
||||
cdev__ocrwip_init(NBPP,bpp), /* 107: on-board parallel port */
|
||||
cdev_notdef(), /* 108 */
|
||||
cdev_fb_init(NTCX,tcx), /* 109: /dev/tcx */
|
||||
cdev_disk_init(NVND,vnd), /* 110: vnode disk driver */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.8 2000/09/21 23:46:49 eeh Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.9 2001/03/26 12:33:26 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -40,13 +40,6 @@
|
||||
#define mmwrite mmrw
|
||||
cdev_decl(mm);
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_openprom_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(openprom);
|
||||
|
||||
cdev_decl(cn);
|
||||
@ -58,12 +51,6 @@ cdev_decl(fd);
|
||||
|
||||
cdev_decl(fb);
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev_gen_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
|
||||
cdev_decl(ms);
|
||||
|
||||
cdev_decl(kbd);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.16 2001/03/21 22:25:56 lukem Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -213,7 +213,7 @@ struct cdevsw cdevsw[] =
|
||||
cdev_notdef(), /* 66 */
|
||||
cdev_fb_init(NCGSIX,cgsix), /* 67: /dev/cgsix */
|
||||
cdev_notdef(), /* 68 */
|
||||
cdev_gen_init(NAUDIO,audio), /* 69: /dev/audio */
|
||||
cdev__ocrwip_init(NAUDIO,audio), /* 69: /dev/audio */
|
||||
cdev_openprom_init(1,openprom), /* 70: /dev/openprom */
|
||||
cdev_notdef(), /* 71 */
|
||||
cdev_i4b_init(NI4B, i4b), /* 72: i4b main device */
|
||||
@ -251,7 +251,7 @@ struct cdevsw cdevsw[] =
|
||||
cdev_notdef(), /* 104 */
|
||||
cdev_bpftun_init(NBPFILTER,bpf),/* 105: packet filter */
|
||||
cdev_notdef(), /* 106 */
|
||||
cdev_gen_init(NBPP,bpp), /* 107: on-board parallel port */
|
||||
cdev__ocrwip_init(NBPP,bpp), /* 107: on-board parallel port */
|
||||
cdev_notdef(), /* 108 */
|
||||
cdev_fb_init(NTCX,tcx), /* 109: /dev/tcx */
|
||||
cdev_disk_init(NVND,vnd), /* 110: vnode disk driver */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.52 2001/02/04 20:36:32 ragge Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.53 2001/03/26 12:33:26 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986 The Regents of the University of California.
|
||||
@ -212,36 +212,36 @@ struct consdev constab[]={
|
||||
/* Special for console storage */
|
||||
#define dev_type_rw(n) int n __P((dev_t, int, int, struct proc *))
|
||||
|
||||
/* plotters - open, close, write, ioctl, poll */
|
||||
/* plotters */
|
||||
/* open, close, write, ioctl, poll */
|
||||
#define cdev_plotter_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, dev_init(c,n,poll), dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* console mass storage - open, close, read/write */
|
||||
/* console mass storage */
|
||||
/* open, close, read, write */
|
||||
#define cdev_cnstore_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
dev_init(c,n,write), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* open, close, write */
|
||||
#define cdev_lp_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_init(c,n,write), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* graphic display adapters */
|
||||
#define cdev_graph_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
/* open, close, read, write, ioctl, stop, poll */
|
||||
#define cdev_graph_init(c,n) cdev__ocrwisp_init(c,n)
|
||||
|
||||
/* Ingres */
|
||||
/* open, close, (read), (write), ioctl */
|
||||
#define cdev_ingres_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) nullop, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,nullop), \
|
||||
dev_noimpl(write,nullop), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.24 2001/03/21 22:25:57 lukem Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.25 2001/03/26 12:33:26 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
@ -85,51 +85,19 @@ struct bdevsw bdevsw[] =
|
||||
};
|
||||
int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev_gen_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
|
||||
/* open, close, ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_grf_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) nullop, \
|
||||
(dev_type_write((*))) nullop, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, read, write, ioctl, tty, mmap */
|
||||
/* open, close, read, write, ioctl, tty, ttpoll */
|
||||
#define cdev_ite_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
dev_init(c,n,tty), ttpoll, (dev_type_mmap((*))) enodev, D_TTY }
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
dev_init(c,n,tty), ttpoll, dev_noimpl(mmap,enodev), D_TTY }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_par_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
#define cdev_par_init(c,n) cdev__ocwi_init(c,n)
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_sram_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_pow_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_bell_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_sram_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_pow_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_bell_init(c,n) cdev__oci_init(c,n)
|
||||
|
||||
#include "i4b.h"
|
||||
#include "i4bctl.h"
|
||||
@ -221,12 +189,12 @@ struct cdevsw cdevsw[] =
|
||||
cdev_tty_init(NZSTTY,zs), /* 12: zs serial */
|
||||
cdev_ite_init(NITE,ite), /* 13: console terminal emulator */
|
||||
#if NKBD > 0
|
||||
cdev_gen_init(1,kbd), /* 14: /dev/kbd */
|
||||
cdev__ocrwip_init(1,kbd), /* 14: /dev/kbd */
|
||||
#else
|
||||
cdev_notdef(),
|
||||
#endif
|
||||
#if NMS > 0
|
||||
cdev_gen_init(1,ms), /* 15: /dev/mouse */
|
||||
cdev__ocrwip_init(1,ms), /* 15: /dev/mouse */
|
||||
#else
|
||||
cdev_notdef(),
|
||||
#endif
|
||||
|
366
sys/sys/conf.h
366
sys/sys/conf.h
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.85 2001/03/21 22:25:57 lukem Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.86 2001/03/26 12:33:22 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -68,9 +68,10 @@ struct vnode;
|
||||
#define dev_type_ioctl(n) \
|
||||
int n __P((dev_t, u_long, caddr_t, int, struct proc *))
|
||||
|
||||
#define dev_decl(n,t) __CONCAT(dev_type_,t)(__CONCAT(n,t))
|
||||
#define dev_decl(n,t) __CONCAT(dev_type_,t)(__CONCAT(n,t))
|
||||
#define dev_init(c,n,t) \
|
||||
((c) > 0 ? __CONCAT(n,t) : (__CONCAT(dev_type_,t)((*))) enxio)
|
||||
#define dev_noimpl(t,f) (__CONCAT(dev_type_,t)((*)))f
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@ -117,23 +118,23 @@ extern struct bdevsw bdevsw[];
|
||||
dev_init(c,n,dump), 0, D_TAPE }
|
||||
|
||||
#define bdev_swap_init(c,n) { \
|
||||
(dev_type_open((*))) enodev, (dev_type_close((*))) enodev, \
|
||||
dev_init(c,n,strategy), (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_dump((*))) enodev, 0 }
|
||||
dev_noimpl(open,enodev), dev_noimpl(close,enodev), \
|
||||
dev_init(c,n,strategy), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(dump,enodev), 0 }
|
||||
|
||||
#ifdef LKM
|
||||
#define bdev_lkm_dummy() { \
|
||||
(dev_type_open((*))) lkmenodev, (dev_type_close((*))) enodev, \
|
||||
(dev_type_strategy((*))) enodev, (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_dump((*))) enodev, 0 }
|
||||
dev_noimpl(open,lkmenodev), dev_noimpl(close,enodev), \
|
||||
dev_noimpl(strategy,enodev), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(dump,enodev), 0 }
|
||||
#else
|
||||
#define bdev_lkm_dummy() bdev_notdef()
|
||||
#endif
|
||||
|
||||
#define bdev_notdef() { \
|
||||
(dev_type_open((*))) enodev, (dev_type_close((*))) enodev, \
|
||||
(dev_type_strategy((*))) enodev, (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_dump((*))) enodev, 0 }
|
||||
dev_noimpl(open,enodev), dev_noimpl(close,enodev), \
|
||||
dev_noimpl(strategy,enodev), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(dump,enodev), 0 }
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@ -174,113 +175,177 @@ extern struct cdevsw cdevsw[];
|
||||
dev_decl(n,write); dev_decl(n,ioctl); dev_decl(n,stop); \
|
||||
dev_decl(n,tty); dev_decl(n,poll); dev_decl(n,mmap)
|
||||
|
||||
/* open, close, read, write, ioctl */
|
||||
#define cdev_disk_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, D_DISK }
|
||||
/* helper macros */
|
||||
|
||||
/* open, close, read, write, ioctl */
|
||||
#define cdev_tape_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, D_TAPE }
|
||||
/* open, close, ioctl */
|
||||
#define cdev__oci_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, read, write, ioctl, stop, tty, poll */
|
||||
#define cdev_tty_init(c,n) { \
|
||||
/* open, close, ioctl, poll */
|
||||
#define cdev__ocip_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, dev_init(c,n,poll), \
|
||||
dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, ioctl, poll, mmap */
|
||||
#define cdev__ocipm_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, dev_init(c,n,poll), dev_init(c,n,mmap), 0 }
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev__ocri_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, read, write */
|
||||
#define cdev__ocrw_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, read, write, ioctl */
|
||||
#define cdev__ocrwi_t_init(c,n,t) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_noimpl(mmap,enodev), t }
|
||||
#define cdev__ocrwi_init(c,n) cdev__ocrwi_t_init(c,n,0)
|
||||
|
||||
/* open, close, read, write, ioctl, mmap */
|
||||
#define cdev__ocrwim_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_init(c,n,mmap), 0 }
|
||||
|
||||
/* open, close, read, ioctl, poll */
|
||||
#define cdev__ocrip_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, dev_init(c,n,poll), \
|
||||
dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, read, write, poll */
|
||||
#define cdev__ocrwp_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(stop,enodev), 0, dev_init(c,n,poll), \
|
||||
dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev__ocrwip_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, dev_init(c,n,poll), dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, (read), (write), ioctl, poll, mmap */
|
||||
#define cdev__ocRWipm_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), \
|
||||
dev_noimpl(read,nullop), dev_noimpl(write,nullop), \
|
||||
dev_init(c,n,ioctl), dev_noimpl(stop,enodev), 0, \
|
||||
dev_init(c,n,poll), dev_init(c,n,mmap), 0 }
|
||||
|
||||
/* open, close, read, write, ioctl, stop, poll */
|
||||
#define cdev__ocrwisp_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, (dev_type_mmap((*))) enodev, D_TTY }
|
||||
0, dev_init(c,n,poll), dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev__ocwi_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_noimpl(mmap,enodev), 0 }
|
||||
|
||||
/* open, close, read, write, ioctl, stop, tty, ttpoll */
|
||||
#define cdev__tty_init(c,n,t) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, dev_noimpl(mmap,enodev), t }
|
||||
|
||||
/* open, close, read, write, ioctl, stop, tty, ttpoll, mmap */
|
||||
#define cdev__ttym_init(c,n,t) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, dev_init(c,n,mmap), t }
|
||||
|
||||
/* open, close, read, write, ioctl */
|
||||
#define cdev_disk_init(c,n) cdev__ocrwi_t_init(c,n,D_DISK)
|
||||
#define cdev_tape_init(c,n) cdev__ocrwi_t_init(c,n,D_TAPE)
|
||||
|
||||
/* open, close, read, write, ioctl, stop, tty, poll */
|
||||
#define cdev_tty_init(c,n) cdev__tty_init(c,n,D_TTY)
|
||||
|
||||
/* open, close, read, ioctl, poll */
|
||||
#define cdev_mouse_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_mouse_init(c,n) cdev__ocrip_init(c,n)
|
||||
|
||||
/* open, close, read, init */
|
||||
#define cdev_scanner_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev, 0 }
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_scanner_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
#ifdef LKM
|
||||
#define cdev_lkm_dummy() { \
|
||||
(dev_type_open((*))) lkmenodev, (dev_type_close((*))) enodev, \
|
||||
(dev_type_read((*))) enodev, (dev_type_write((*))) enodev, \
|
||||
(dev_type_ioctl((*))) enodev, (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
dev_noimpl(open,lkmenodev), dev_noimpl(close,enodev), \
|
||||
dev_noimpl(read,enodev), dev_noimpl(write,enodev), \
|
||||
dev_noimpl(ioctl,enodev), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
#else
|
||||
#define cdev_lkm_dummy() cdev_notdef()
|
||||
#endif
|
||||
|
||||
#define cdev_notdef() { \
|
||||
(dev_type_open((*))) enodev, (dev_type_close((*))) enodev, \
|
||||
(dev_type_read((*))) enodev, (dev_type_write((*))) enodev, \
|
||||
(dev_type_ioctl((*))) enodev, (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
dev_noimpl(open,enodev), dev_noimpl(close,enodev), \
|
||||
dev_noimpl(read,enodev), dev_noimpl(write,enodev), \
|
||||
dev_noimpl(ioctl,enodev), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* open, close, read, write, ioctl, stop, poll -- XXX should be a tty */
|
||||
#define cdev_cn_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, D_TTY }
|
||||
0, dev_init(c,n,poll), dev_noimpl(mmap,enodev), D_TTY }
|
||||
|
||||
/* open, read, write, ioctl, poll -- XXX should be a tty */
|
||||
/* open, (close), read, write, ioctl, (stop), poll -- XXX should be a tty */
|
||||
#define cdev_ctty_init(c,n) { \
|
||||
dev_init(c,n,open), (dev_type_close((*))) nullop, dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, D_TTY }
|
||||
dev_init(c,n,open), dev_noimpl(close,nullop), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,nullop), \
|
||||
0, dev_init(c,n,poll), dev_noimpl(mmap,enodev), D_TTY }
|
||||
|
||||
/* open, close, read, write, mmap */
|
||||
#define cdev_mm_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, dev_init(c,n,mmap) }
|
||||
dev_init(c,n,write), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_init(c,n,mmap) }
|
||||
|
||||
/* read, write */
|
||||
/* (open), (close), read, write */
|
||||
#define cdev_swap_init(c,n) { \
|
||||
(dev_type_open((*))) nullop, (dev_type_close((*))) nullop, \
|
||||
dev_init(c,n,read), dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
dev_noimpl(open,nullop), dev_noimpl(close,nullop), \
|
||||
dev_init(c,n,read), dev_init(c,n,write), dev_noimpl(ioctl,enodev), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* open, close, read, write, ioctl, tty, poll */
|
||||
/* open, close, read, write, ioctl, (stop), tty, poll */
|
||||
#define cdev_ptc_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
|
||||
dev_init(c,n,tty), dev_init(c,n,poll), (dev_type_mmap((*))) enodev, \
|
||||
D_TTY }
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,nullop), \
|
||||
dev_init(c,n,tty), dev_init(c,n,poll), dev_noimpl(mmap,enodev), D_TTY }
|
||||
|
||||
/* open, close, read, ioctl, poll -- XXX should be a generic device */
|
||||
#define cdev_log_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_ch_init(c,n) cdev_log_init(c,n)
|
||||
#define cdev_log_init(c,n) cdev__ocrip_init(c,n)
|
||||
#define cdev_ch_init(c,n) cdev__ocrip_init(c,n)
|
||||
|
||||
/* open */
|
||||
#define cdev_fd_init(c,n) { \
|
||||
dev_init(c,n,open), (dev_type_close((*))) enodev, \
|
||||
(dev_type_read((*))) enodev, (dev_type_write((*))) enodev, \
|
||||
(dev_type_ioctl((*))) enodev, (dev_type_stop((*))) enodev, \
|
||||
0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev }
|
||||
dev_init(c,n,open), dev_noimpl(close,enodev), \
|
||||
dev_noimpl(read,enodev), dev_noimpl(write,enodev), \
|
||||
dev_noimpl(ioctl,enodev), dev_noimpl(stop,enodev), \
|
||||
0, seltrue, dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* open, close, read, write, ioctl, poll -- XXX should be generic device */
|
||||
#define cdev_bpftun_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
#define cdev_bpftun_init(c,n) cdev__ocrwip_init(c,n)
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev__oci_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_lkm_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_uk_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_scsibus_init(c,n) cdev__oci_init(c,n)
|
||||
@ -288,157 +353,90 @@ extern struct cdevsw cdevsw[];
|
||||
#define cdev_ses_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_sysmon_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_openfirm_init(c,n) cdev__oci_init(c,n)
|
||||
#define cdev_openprom_init(c,n) cdev__oci_init(c,n)
|
||||
|
||||
#define cdev_usb_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
/* open, close, read, ioctl, poll */
|
||||
#define cdev_usb_init(c,n) cdev__ocrip_init(c,n)
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev__ocrwip_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_rnd_init(c,n) cdev__ocrwip_init(c,n)
|
||||
#define cdev_usbdev_init(c,n) cdev__ocrwip_init(c,n)
|
||||
#define cdev_ugen_init(c,n) cdev__ocrwip_init(c,n)
|
||||
#define cdev_midi_init(c,n) cdev__ocrwip_init(c,n)
|
||||
|
||||
/* open, close, ioctl, poll, mmap */
|
||||
#define cdev_fb_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
dev_init(c,n,mmap) }
|
||||
#define cdev_fb_init(c,n) cdev__ocipm_init(c,n)
|
||||
|
||||
/* open, close, read, write, ioctl, poll, mmap */
|
||||
#define cdev_audio_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_noimpl(stop,enodev), \
|
||||
0, dev_init(c,n,poll), dev_init(c,n,mmap) }
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev_midi_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_ipf_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_ipf_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
/* open */
|
||||
#define cdev_svr4_net_init(c,n) { \
|
||||
dev_init(c,n,open), (dev_type_close((*))) enodev, \
|
||||
(dev_type_read((*))) enodev, (dev_type_write((*))) enodev, \
|
||||
(dev_type_ioctl((*))) enodev, (dev_type_stop((*))) nullop, \
|
||||
0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev }
|
||||
dev_init(c,n,open), dev_noimpl(close,enodev), \
|
||||
dev_noimpl(read,enodev), dev_noimpl(write,enodev), \
|
||||
dev_noimpl(ioctl,enodev), dev_noimpl(stop,enodev), \
|
||||
0, dev_noimpl(poll,enodev), dev_noimpl(mmap,enodev) }
|
||||
|
||||
/* open, close, read, write, ioctl, stop, tty, poll, mmap */
|
||||
#define cdev_wsdisplay_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, dev_init(c,n,mmap), D_TTY }
|
||||
/* open, close, read, write, ioctl, stop, tty, ttpoll, mmap */
|
||||
#define cdev_wsdisplay_init(c,n) cdev__ttym_init(c,n,D_TTY)
|
||||
|
||||
/* open, close, (read), (write), ioctl, poll, mmap -- XXX should be a map device */
|
||||
#define cdev_grf_init(c,n) cdev__ocRWipm_init(c,n)
|
||||
#define cdev_view_init(c,n) cdev__ocRWipm_init(c,n)
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_spkr_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
#define cdev_spkr_init(c,n) cdev__ocwi_init(c,n)
|
||||
|
||||
/* open, close, read, write, ioctl, select */
|
||||
#define cdev_vc_nb_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) nullop, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev_vc_nb_init(c,n) cdev__ocrwip_init(c,n)
|
||||
|
||||
/* open, close, read, write, ioctl, stop, poll */
|
||||
#define cdev_esh_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, 0 }
|
||||
#define cdev_esh_init(c,n) cdev__ocrwisp_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl, mmap */
|
||||
#define cdev_bktr_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
(dev_init(c,n,mmap)) }
|
||||
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
|
||||
dev_noimpl(stop,enodev), 0, seltrue, (dev_init(c,n,mmap)) }
|
||||
|
||||
/* open, close, read, write, ioctl, tty, mmap */
|
||||
#define cdev_pc_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), dev_init(c,n,stop), \
|
||||
dev_init(c,n,tty), ttpoll, dev_init(c,n,mmap), D_TTY }
|
||||
/* open, close, read, write, ioctl, stop, tty, mmap */
|
||||
#define cdev_pc_init(c,n) cdev__ttym_init(c,n,D_TTY)
|
||||
|
||||
/* open, close, write, ioctl */
|
||||
#define cdev_lpt_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
0, seltrue, (dev_type_mmap((*))) enodev }
|
||||
#define cdev_lpt_init(c,n) cdev__ocwi_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_joy_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_joy_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
/* open, close, ioctl, poll -- XXX should be a generic device */
|
||||
#define cdev_ocis_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev, 0 }
|
||||
#define cdev_apm_init cdev_ocis_init
|
||||
#define cdev_apm_init(c,n) cdev__ocip_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl, poll */
|
||||
#define cdev_satlink_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_satlink_init(c,n) cdev__ocrip_init(c,n)
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_i4bctl_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, seltrue, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_wdog_init(c,n) cdev__oci_init(c,n)
|
||||
|
||||
/* open, close, ioctl */
|
||||
#define cdev_i4bctl_init(c,n) cdev__oci_init(c,n)
|
||||
|
||||
/* open, close, read, write, ioctl, poll */
|
||||
#define cdev_i4brbch_init(c,n) cdev__ocrwip_init(c,n)
|
||||
|
||||
/* open, close, read, write, poll */
|
||||
#define cdev_i4brbch_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
|
||||
|
||||
/* open, close, read, write, poll */
|
||||
#define cdev_i4btel_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
|
||||
(dev_type_stop((*))) enodev, \
|
||||
0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, D_TTY }
|
||||
#define cdev_i4btel_init(c,n) cdev__ocrwp_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl */
|
||||
#define cdev_i4btrc_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
#define cdev_i4btrc_init(c,n) cdev__ocri_init(c,n)
|
||||
|
||||
/* open, close, read, ioctl, poll */
|
||||
#define cdev_i4b_init(c,n) { \
|
||||
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
|
||||
(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
|
||||
(dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
|
||||
(dev_type_mmap((*))) enodev }
|
||||
|
||||
#define cdev_i4b_init(c,n) cdev__ocrip_init(c,n)
|
||||
|
||||
/* symbolic sleep message strings */
|
||||
extern const char devopn[], devio[], devwait[], devin[], devout[];
|
||||
|
Loading…
Reference in New Issue
Block a user