Get rid of private *read() and *write() functions.
This commit is contained in:
parent
19017044cf
commit
bbc1b37ee0
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* from: Utah Hdr: cd.c 1.6 90/11/28
|
||||
* from: @(#)cd.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: cd.c,v 1.4 1994/02/10 13:59:25 mycroft Exp $
|
||||
* $Id: cd.c,v 1.5 1994/05/11 10:16:11 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -572,32 +572,6 @@ cdiodone(cbp)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
cdread(dev, uio)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
{
|
||||
register int unit = cdunit(dev);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (cddebug & CDB_FOLLOW)
|
||||
printf("cdread(%x, %x)\n", dev, uio);
|
||||
#endif
|
||||
return(physio(cdstrategy, &cdbuf[unit], dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
cdwrite(dev, uio)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
{
|
||||
register int unit = cdunit(dev);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (cddebug & CDB_FOLLOW)
|
||||
printf("cdwrite(%x, %x)\n", dev, uio);
|
||||
#endif
|
||||
return(physio(cdstrategy, &cdbuf[unit], dev, B_WRITE, minphys, uio));
|
||||
}
|
||||
|
||||
cdioctl(dev, cmd, data, flag, p)
|
||||
dev_t dev;
|
||||
int cmd;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ct.c 7.3 (Berkeley) 5/4/91
|
||||
* $Id: ct.c,v 1.6 1994/02/10 13:59:27 mycroft Exp $
|
||||
* $Id: ct.c,v 1.7 1994/05/11 10:16:14 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include "ct.h"
|
||||
|
@ -776,24 +776,6 @@ done:
|
|||
ctustart(unit);
|
||||
}
|
||||
|
||||
ctread(dev, uio)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
{
|
||||
register int unit = UNIT(dev);
|
||||
|
||||
return(physio(ctstrategy, &ctbuf[unit], dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
ctwrite(dev, uio)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
{
|
||||
register int unit = UNIT(dev);
|
||||
|
||||
return(physio(ctstrategy, &ctbuf[unit], dev, B_WRITE, minphys, uio));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
ctioctl(dev, cmd, data, flag, p)
|
||||
dev_t dev;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* from: Utah Hdr: rd.c 1.38 90/10/12
|
||||
* from: @(#)rd.c 7.9 (Berkeley) 5/7/91
|
||||
* $Id: rd.c,v 1.6 1994/05/05 10:10:38 mycroft Exp $
|
||||
* $Id: rd.c,v 1.7 1994/05/11 10:16:16 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1013,28 +1013,6 @@ rderror(unit)
|
|||
return(1);
|
||||
}
|
||||
|
||||
int
|
||||
rdread(dev, uio, flags)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
register int unit = rdunit(dev);
|
||||
|
||||
return (physio(rdstrategy, NULL, dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
int
|
||||
rdwrite(dev, uio, flags)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
register int unit = rdunit(dev);
|
||||
|
||||
return (physio(rdstrategy, NULL, dev, B_WRITE, minphys, uio));
|
||||
}
|
||||
|
||||
int
|
||||
rdioctl(dev, cmd, data, flag, p)
|
||||
dev_t dev;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sd.c 7.8 (Berkeley) 6/9/91
|
||||
* $Id: sd.c,v 1.7 1994/02/22 07:17:22 hpeyerl Exp $
|
||||
* $Id: sd.c,v 1.8 1994/05/11 10:16:19 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -759,38 +759,6 @@ sdintr(unit, stat)
|
|||
sdfinish(unit, sc, bp);
|
||||
}
|
||||
|
||||
int
|
||||
sdread(dev, uio, flags)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
register int unit = sdunit(dev);
|
||||
register int pid;
|
||||
|
||||
if ((pid = sd_softc[unit].sc_format_pid) &&
|
||||
pid != uio->uio_procp->p_pid)
|
||||
return (EPERM);
|
||||
|
||||
return (physio(sdstrategy, NULL, dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
int
|
||||
sdwrite(dev, uio, flags)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
register int unit = sdunit(dev);
|
||||
register int pid;
|
||||
|
||||
if ((pid = sd_softc[unit].sc_format_pid) &&
|
||||
pid != uio->uio_procp->p_pid)
|
||||
return (EPERM);
|
||||
|
||||
return (physio(sdstrategy, NULL, dev, B_WRITE, minphys, uio));
|
||||
}
|
||||
|
||||
int
|
||||
sdioctl(dev, cmd, data, flag, p)
|
||||
dev_t dev;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* from: Utah Hdr: st.c 1.8 90/10/14
|
||||
* from: @(#)st.c 7.3 (Berkeley) 5/4/91
|
||||
* $Id: st.c,v 1.6 1994/02/10 13:59:47 mycroft Exp $
|
||||
* $Id: st.c,v 1.7 1994/05/11 10:16:21 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -829,24 +829,6 @@ stfinish(unit, sc, bp)
|
|||
sttab[unit].b_active = 0;
|
||||
}
|
||||
|
||||
stread(dev, uio)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
{
|
||||
int unit = UNIT(dev);
|
||||
|
||||
return(physio(ststrategy, &stbuf[unit], dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
stwrite(dev, uio)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
{
|
||||
int unit = UNIT(dev);
|
||||
|
||||
return(physio(ststrategy, &stbuf[unit], dev, B_WRITE, minphys, uio));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
stdump(dev)
|
||||
dev_t dev;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* from: Utah Hdr: vn.c 1.1 91/04/30
|
||||
* from: @(#)vn.c 7.6 (Berkeley) 6/21/91
|
||||
* $Id: vn.c,v 1.5 1994/01/11 17:19:44 mycroft Exp $
|
||||
* $Id: vn.c,v 1.6 1994/05/11 10:16:24 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -274,36 +274,6 @@ vniodone(bp)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
vnread(dev, uio, flags, p)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
{
|
||||
register int unit = vnunit(dev);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (vndebug & VDB_FOLLOW)
|
||||
printf("vnread(%x, %x, %x, %x)\n", dev, uio, flags, p);
|
||||
#endif
|
||||
return(physio(vnstrategy, &vnbuf[unit], dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
vnwrite(dev, uio, flags, p)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
{
|
||||
register int unit = vnunit(dev);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (vndebug & VDB_FOLLOW)
|
||||
printf("vnwrite(%x, %x, %x, %x)\n", dev, uio, flags, p);
|
||||
#endif
|
||||
return(physio(vnstrategy, &vnbuf[unit], dev, B_WRITE, minphys, uio));
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
vnioctl(dev, cmd, data, flag, p)
|
||||
dev_t dev;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)conf.c 7.9 (Berkeley) 5/28/91
|
||||
* $Id: conf.c,v 1.6 1994/02/15 16:25:04 mycroft Exp $
|
||||
* $Id: conf.c,v 1.7 1994/05/11 10:19:23 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -131,15 +131,15 @@ int nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]);
|
|||
|
||||
/* open, read, write, ioctl, strategy */
|
||||
#define cdev_disk_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((*))) enodev, \
|
||||
dev_init(c,n,open), (dev_type_close((*))) nullop, rawread, rawrite, \
|
||||
dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
(dev_type_reset((*))) nullop, 0, seltrue, (dev_type_map((*))) enodev, \
|
||||
dev_init(c,n,strategy) }
|
||||
|
||||
/* open, close, read, write, ioctl, strategy */
|
||||
#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, \
|
||||
dev_init(c,n,open), dev_init(c,n,close), rawread, rawwrite, \
|
||||
dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
(dev_type_reset((*))) nullop, 0, seltrue, (dev_type_map((*))) enodev, \
|
||||
dev_init(c,n,strategy) }
|
||||
|
||||
|
@ -273,8 +273,8 @@ cdev_decl(clock);
|
|||
cdev_decl(vn);
|
||||
/* open, read, write, ioctl -- XXX should be a disk */
|
||||
#define cdev_vn_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((*))) enodev, \
|
||||
dev_init(c,n,open), (dev_type_close((*))) nullop, rawread, rawwrite, \
|
||||
dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
|
||||
(dev_type_reset((*))) nullop, 0, seltrue, (dev_type_map((*))) enodev, \
|
||||
0 }
|
||||
|
||||
|
|
Loading…
Reference in New Issue