Removed new alias d_size_t for d_psize_t.

Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
This commit is contained in:
Bruce Evans 1995-12-10 15:55:34 +00:00
parent d9f9371008
commit c73feca0b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12731
26 changed files with 78 additions and 80 deletions

View File

@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $Id: mem.c,v 1.23 1995/12/08 11:13:25 julian Exp $
* $Id: mem.c,v 1.24 1995/12/08 23:20:02 phk Exp $
*/
/*
@ -72,7 +72,7 @@
static d_open_t mmopen;
static d_close_t mmclose;
static d_rdwr_t mmrw;
static d_read_t mmrw;
static d_ioctl_t mmioctl;
static d_mmap_t memmmap;

View File

@ -27,7 +27,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: cy.c,v 1.24 1995/12/08 11:14:04 julian Exp $
* $Id: cy.c,v 1.25 1995/12/08 23:20:24 phk Exp $
*/
#include "cy.h"
@ -368,7 +368,7 @@ static d_read_t cyread;
static d_write_t cywrite;
static d_ioctl_t cyioctl;
static d_stop_t cystop;
static d_ttycv_t cydevtotty;
static d_devtotty_t cydevtotty;
#define CDEV_MAJOR 48
static struct cdevsw cy_cdevsw =

View File

@ -27,7 +27,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: cy.c,v 1.24 1995/12/08 11:14:04 julian Exp $
* $Id: cy.c,v 1.25 1995/12/08 23:20:24 phk Exp $
*/
#include "cy.h"
@ -368,7 +368,7 @@ static d_read_t cyread;
static d_write_t cywrite;
static d_ioctl_t cyioctl;
static d_stop_t cystop;
static d_ttycv_t cydevtotty;
static d_devtotty_t cydevtotty;
#define CDEV_MAJOR 48
static struct cdevsw cy_cdevsw =

View File

@ -1,5 +1,5 @@
/*-
* dgb.c $Id: dgb.c,v 1.10 1995/12/08 11:12:42 julian Exp $
* dgb.c $Id: dgb.c,v 1.11 1995/12/08 23:19:28 phk Exp $
*
* Digiboard driver.
*
@ -201,7 +201,7 @@ static d_read_t dgbread;
static d_write_t dgbwrite;
static d_ioctl_t dgbioctl;
static d_stop_t dgbstop;
static d_ttycv_t dgbdevtotty;
static d_devtotty_t dgbdevtotty;
#define CDEV_MAJOR 58
static struct cdevsw dgb_cdevsw =

View File

@ -106,7 +106,7 @@ static d_read_t rcread;
static d_write_t rcwrite;
static d_ioctl_t rcioctl;
static d_stop_t rcstop;
static d_ttycv_t rcdevtotty;
static d_devtotty_t rcdevtotty;
#define CDEV_MAJOR 63
static struct cdevsw rc_cdevsw =

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.24 1995/12/08 23:20:41 phk Exp $
* $Id: si.c,v 1.25 1995/12/10 13:39:12 phk Exp $
*/
#ifndef lint
@ -119,7 +119,7 @@ static d_read_t siread;
static d_write_t siwrite;
static d_ioctl_t siioctl;
static d_stop_t sistop;
static d_ttycv_t sidevtotty;
static d_devtotty_t sidevtotty;
#define CDEV_MAJOR 68
static struct cdevsw si_cdevsw =

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.126 1995/12/08 23:20:44 phk Exp $
* $Id: sio.c,v 1.127 1995/12/10 13:39:13 phk Exp $
*/
#include "sio.h"
@ -305,7 +305,7 @@ static d_read_t sioread;
static d_write_t siowrite;
static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_ttycv_t siodevtotty;
static d_devtotty_t siodevtotty;
#define CDEV_MAJOR 28
static struct cdevsw sio_cdevsw =

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.c,v 1.135 1995/12/08 11:15:28 julian Exp $
* $Id: syscons.c,v 1.136 1995/12/10 13:39:18 phk Exp $
*/
#include "sc.h"
@ -158,10 +158,10 @@ struct isa_driver scdriver = {
static d_open_t scopen;
static d_close_t scclose;
static d_rdwr_t scread;
static d_rdwr_t scwrite;
static d_read_t scread;
static d_write_t scwrite;
static d_ioctl_t scioctl;
static d_ttycv_t scdevtotty;
static d_devtotty_t scdevtotty;
static d_mmap_t scmmap;
static struct cdevsw scdevsw = {

View File

@ -1,5 +1,5 @@
/*-
* dgb.c $Id: dgb.c,v 1.10 1995/12/08 11:12:42 julian Exp $
* dgb.c $Id: dgb.c,v 1.11 1995/12/08 23:19:28 phk Exp $
*
* Digiboard driver.
*
@ -201,7 +201,7 @@ static d_read_t dgbread;
static d_write_t dgbwrite;
static d_ioctl_t dgbioctl;
static d_stop_t dgbstop;
static d_ttycv_t dgbdevtotty;
static d_devtotty_t dgbdevtotty;
#define CDEV_MAJOR 58
static struct cdevsw dgb_cdevsw =

View File

@ -1,6 +1,6 @@
static char _ittyid[] = "@(#)$Id: iitty.c,v 1.16 1995/12/08 11:12:56 julian Exp $";
static char _ittyid[] = "@(#)$Id: iitty.c,v 1.17 1995/12/08 23:19:42 phk Exp $";
/*******************************************************************************
* II - Version 0.1 $Revision: 1.16 $ $State: Exp $
* II - Version 0.1 $Revision: 1.17 $ $State: Exp $
*
* Copyright 1994 Dietmar Friede
*******************************************************************************
@ -10,6 +10,9 @@ static char _ittyid[] = "@(#)$Id: iitty.c,v 1.16 1995/12/08 11:12:56 julian
*
*******************************************************************************
* $Log: iitty.c,v $
* Revision 1.17 1995/12/08 23:19:42 phk
* Julian forgot to make the *devsw structures static.
*
* Revision 1.16 1995/12/08 11:12:56 julian
* Pass 3 of the great devsw changes
* most devsw referenced functions are now static, as they are
@ -220,7 +223,7 @@ static d_read_t ityread;
static d_write_t itywrite;
static d_ioctl_t ityioctl;
static d_stop_t itystop;
static d_ttycv_t itydevtotty;
static d_devtotty_t itydevtotty;
#define CDEV_MAJOR 56
static struct cdevsw ity_cdevsw =

View File

@ -1,6 +1,6 @@
static char _isdnid[] = "@(#)$Id: isdn.c,v 1.9 1995/12/08 11:13:01 julian Exp $";
static char _isdnid[] = "@(#)$Id: isdn.c,v 1.10 1995/12/08 23:19:44 phk Exp $";
/*******************************************************************************
* II - Version 0.1 $Revision: 1.9 $ $State: Exp $
* II - Version 0.1 $Revision: 1.10 $ $State: Exp $
*
* Copyright 1994 Dietmar Friede
*******************************************************************************
@ -10,6 +10,9 @@ static char _isdnid[] = "@(#)$Id: isdn.c,v 1.9 1995/12/08 11:13:01 julian Ex
*
*******************************************************************************
* $Log: isdn.c,v $
* Revision 1.10 1995/12/08 23:19:44 phk
* Julian forgot to make the *devsw structures static.
*
* Revision 1.9 1995/12/08 11:13:01 julian
* Pass 3 of the great devsw changes
* most devsw referenced functions are now static, as they are
@ -128,7 +131,6 @@ static void passout __P((int unit, int l, char *buf));
static d_open_t isdnopen;
static d_close_t isdnclose;
static d_rdwr_t isdnrw;
static d_read_t isdnread;
static d_write_t isdnwrite;
static d_ioctl_t isdnioctl;

View File

@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $Id: mem.c,v 1.23 1995/12/08 11:13:25 julian Exp $
* $Id: mem.c,v 1.24 1995/12/08 23:20:02 phk Exp $
*/
/*
@ -72,7 +72,7 @@
static d_open_t mmopen;
static d_close_t mmclose;
static d_rdwr_t mmrw;
static d_read_t mmrw;
static d_ioctl_t mmioctl;
static d_mmap_t memmmap;

View File

@ -84,8 +84,8 @@ static d_read_t cxread;
static d_write_t cxwrite;
static d_ioctl_t cxioctl;
static d_stop_t cxstop;
static d_devtotty_t cxdevtotty;
static d_select_t cxselect;
static d_ttycv_t cxdevtotty;
# define CDEV_MAJOR 42

View File

@ -27,7 +27,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: cy.c,v 1.24 1995/12/08 11:14:04 julian Exp $
* $Id: cy.c,v 1.25 1995/12/08 23:20:24 phk Exp $
*/
#include "cy.h"
@ -368,7 +368,7 @@ static d_read_t cyread;
static d_write_t cywrite;
static d_ioctl_t cyioctl;
static d_stop_t cystop;
static d_ttycv_t cydevtotty;
static d_devtotty_t cydevtotty;
#define CDEV_MAJOR 48
static struct cdevsw cy_cdevsw =

View File

@ -109,10 +109,10 @@ static char vt_description[];
static d_open_t pcopen;
static d_close_t pcclose;
static d_rdwr_t pcread;
static d_rdwr_t pcwrite;
static d_read_t pcread;
static d_write_t pcwrite;
static d_ioctl_t pcioctl;
static d_ttycv_t pcdevtotty;
static d_devtotty_t pcdevtotty;
static d_mmap_t pcmmap;
static struct cdevsw pcdevsw = {

View File

@ -106,7 +106,7 @@ static d_read_t rcread;
static d_write_t rcwrite;
static d_ioctl_t rcioctl;
static d_stop_t rcstop;
static d_ttycv_t rcdevtotty;
static d_devtotty_t rcdevtotty;
#define CDEV_MAJOR 63
static struct cdevsw rc_cdevsw =

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.24 1995/12/08 23:20:41 phk Exp $
* $Id: si.c,v 1.25 1995/12/10 13:39:12 phk Exp $
*/
#ifndef lint
@ -119,7 +119,7 @@ static d_read_t siread;
static d_write_t siwrite;
static d_ioctl_t siioctl;
static d_stop_t sistop;
static d_ttycv_t sidevtotty;
static d_devtotty_t sidevtotty;
#define CDEV_MAJOR 68
static struct cdevsw si_cdevsw =

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.126 1995/12/08 23:20:44 phk Exp $
* $Id: sio.c,v 1.127 1995/12/10 13:39:13 phk Exp $
*/
#include "sio.h"
@ -305,7 +305,7 @@ static d_read_t sioread;
static d_write_t siowrite;
static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_ttycv_t siodevtotty;
static d_devtotty_t siodevtotty;
#define CDEV_MAJOR 28
static struct cdevsw sio_cdevsw =

View File

@ -101,7 +101,6 @@ struct isa_driver spigotdriver = {spigot_probe, spigot_attach, "spigot"};
static d_open_t spigot_open;
static d_close_t spigot_close;
static d_rdwr_t spigot_rw;
static d_read_t spigot_read;
static d_write_t spigot_write;
static d_ioctl_t spigot_ioctl;

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.c,v 1.135 1995/12/08 11:15:28 julian Exp $
* $Id: syscons.c,v 1.136 1995/12/10 13:39:18 phk Exp $
*/
#include "sc.h"
@ -158,10 +158,10 @@ struct isa_driver scdriver = {
static d_open_t scopen;
static d_close_t scclose;
static d_rdwr_t scread;
static d_rdwr_t scwrite;
static d_read_t scread;
static d_write_t scwrite;
static d_ioctl_t scioctl;
static d_ttycv_t scdevtotty;
static d_devtotty_t scdevtotty;
static d_mmap_t scmmap;
static struct cdevsw scdevsw = {

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.97 1995/12/08 11:15:43 julian Exp $
* $Id: wd.c,v 1.98 1995/12/08 23:20:52 phk Exp $
*/
/* TODO:
@ -303,10 +303,10 @@ struct isa_driver wdcdriver = {
static d_open_t wdopen;
static d_close_t wdclose;
static d_strategy_t wdstrategy;
static d_ioctl_t wdioctl;
static d_dump_t wddump;
static d_size_t wdsize;
static d_strategy_t wdstrategy;
static d_psize_t wdsize;
#define CDEV_MAJOR 3
#define BDEV_MAJOR 0

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.126 1995/12/08 23:20:44 phk Exp $
* $Id: sio.c,v 1.127 1995/12/10 13:39:13 phk Exp $
*/
#include "sio.h"
@ -305,7 +305,7 @@ static d_read_t sioread;
static d_write_t siowrite;
static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_ttycv_t siodevtotty;
static d_devtotty_t siodevtotty;
#define CDEV_MAJOR 28
static struct cdevsw sio_cdevsw =

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.c,v 1.135 1995/12/08 11:15:28 julian Exp $
* $Id: syscons.c,v 1.136 1995/12/10 13:39:18 phk Exp $
*/
#include "sc.h"
@ -158,10 +158,10 @@ struct isa_driver scdriver = {
static d_open_t scopen;
static d_close_t scclose;
static d_rdwr_t scread;
static d_rdwr_t scwrite;
static d_read_t scread;
static d_write_t scwrite;
static d_ioctl_t scioctl;
static d_ttycv_t scdevtotty;
static d_devtotty_t scdevtotty;
static d_mmap_t scmmap;
static struct cdevsw scdevsw = {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_pty.c 8.2 (Berkeley) 9/23/93
* $Id: tty_pty.c,v 1.29 1995/12/08 11:17:09 julian Exp $
* $Id: tty_pty.c,v 1.30 1995/12/08 23:21:34 phk Exp $
*/
/*
@ -66,7 +66,7 @@ static d_read_t ptsread;
static d_write_t ptswrite;
static d_ioctl_t ptyioctl;
static d_stop_t ptsstop;
static d_ttycv_t ptydevtotty;
static d_devtotty_t ptydevtotty;
static d_open_t ptcopen;
static d_close_t ptcclose;
static d_read_t ptcread;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.3 (Berkeley) 1/21/94
* $Id: conf.h,v 1.25 1995/12/08 11:19:24 julian Exp $
* $Id: conf.h,v 1.26 1995/12/10 13:45:30 phk Exp $
*/
#ifndef _SYS_CONF_H_
@ -52,23 +52,20 @@ struct tty;
struct uio;
struct vnode;
typedef void d_strategy_t __P((struct buf *));
typedef int d_open_t __P((dev_t, int, int, struct proc *));
typedef int d_close_t __P((dev_t, int, int, struct proc *));
typedef void d_strategy_t __P((struct buf *));
typedef int d_ioctl_t __P((dev_t, int, caddr_t, int, struct proc *));
typedef int d_dump_t __P((dev_t));
typedef int d_psize_t __P((dev_t));
typedef int d_size_t __P((dev_t));
typedef int d_read_t __P((dev_t, struct uio *, int));
typedef int d_write_t __P((dev_t, struct uio *, int));
typedef int d_rdwr_t __P((dev_t, struct uio *, int));
typedef void d_stop_t __P((struct tty *, int));
typedef int d_reset_t __P((dev_t));
typedef struct tty *d_devtotty_t __P((dev_t));
typedef int d_select_t __P((dev_t, int, struct proc *));
typedef int d_mmap_t __P((dev_t, int, int));
typedef struct tty * d_ttycv_t __P((dev_t));
typedef int l_open_t __P((dev_t dev, struct tty *tp));
typedef int l_close_t __P((struct tty *tp, int flag));
@ -100,18 +97,18 @@ extern struct bdevsw bdevsw[];
struct cdevsw {
d_open_t *d_open;
d_close_t *d_close;
d_rdwr_t *d_read;
d_rdwr_t *d_write;
d_read_t *d_read;
d_write_t *d_write;
d_ioctl_t *d_ioctl;
d_stop_t *d_stop;
d_reset_t *d_reset; /* XXX not used */
d_ttycv_t *d_devtotty;
d_devtotty_t *d_devtotty;
d_select_t *d_select;
d_mmap_t *d_mmap;
d_strategy_t *d_strategy;
char *d_name;
struct bdevsw *d_bdev; /* cross pointer to the bdev */
int d_maj; /* the major number we were assigned */
char *d_name; /* see above */
struct bdevsw *d_bdev;
int d_maj;
};
#ifdef KERNEL
@ -196,8 +193,8 @@ d_select_t nxselect;
d_dump_t nxdump;
#define nxpsize nopsize /* one NULL value is as good as another */
d_rdwr_t rawread;
d_rdwr_t rawwrite;
d_read_t rawread;
d_write_t rawwrite;
l_read_t l_noread;
l_write_t l_nowrite;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.3 (Berkeley) 1/21/94
* $Id: conf.h,v 1.25 1995/12/08 11:19:24 julian Exp $
* $Id: conf.h,v 1.26 1995/12/10 13:45:30 phk Exp $
*/
#ifndef _SYS_CONF_H_
@ -52,23 +52,20 @@ struct tty;
struct uio;
struct vnode;
typedef void d_strategy_t __P((struct buf *));
typedef int d_open_t __P((dev_t, int, int, struct proc *));
typedef int d_close_t __P((dev_t, int, int, struct proc *));
typedef void d_strategy_t __P((struct buf *));
typedef int d_ioctl_t __P((dev_t, int, caddr_t, int, struct proc *));
typedef int d_dump_t __P((dev_t));
typedef int d_psize_t __P((dev_t));
typedef int d_size_t __P((dev_t));
typedef int d_read_t __P((dev_t, struct uio *, int));
typedef int d_write_t __P((dev_t, struct uio *, int));
typedef int d_rdwr_t __P((dev_t, struct uio *, int));
typedef void d_stop_t __P((struct tty *, int));
typedef int d_reset_t __P((dev_t));
typedef struct tty *d_devtotty_t __P((dev_t));
typedef int d_select_t __P((dev_t, int, struct proc *));
typedef int d_mmap_t __P((dev_t, int, int));
typedef struct tty * d_ttycv_t __P((dev_t));
typedef int l_open_t __P((dev_t dev, struct tty *tp));
typedef int l_close_t __P((struct tty *tp, int flag));
@ -100,18 +97,18 @@ extern struct bdevsw bdevsw[];
struct cdevsw {
d_open_t *d_open;
d_close_t *d_close;
d_rdwr_t *d_read;
d_rdwr_t *d_write;
d_read_t *d_read;
d_write_t *d_write;
d_ioctl_t *d_ioctl;
d_stop_t *d_stop;
d_reset_t *d_reset; /* XXX not used */
d_ttycv_t *d_devtotty;
d_devtotty_t *d_devtotty;
d_select_t *d_select;
d_mmap_t *d_mmap;
d_strategy_t *d_strategy;
char *d_name;
struct bdevsw *d_bdev; /* cross pointer to the bdev */
int d_maj; /* the major number we were assigned */
char *d_name; /* see above */
struct bdevsw *d_bdev;
int d_maj;
};
#ifdef KERNEL
@ -196,8 +193,8 @@ d_select_t nxselect;
d_dump_t nxdump;
#define nxpsize nopsize /* one NULL value is as good as another */
d_rdwr_t rawread;
d_rdwr_t rawwrite;
d_read_t rawread;
d_write_t rawwrite;
l_read_t l_noread;
l_write_t l_nowrite;