SCCS-vsn: sys/vax/vax/conf.c 7.14
SCCS-vsn: sys/vax/vax/crl.c 7.2
SCCS-vsn: sys/vax/vax/flp.c 7.2
SCCS-vsn: sys/vax/vax/mem.c 7.2
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)conf.c 7.13 (Berkeley) %G%
+ * @(#)conf.c 7.14 (Berkeley) %G%
-int crlopen(),crlclose(),crlread(),crlwrite();
+int crlopen(),crlclose(),crlrw();
#else
#define crlopen nodev
#define crlclose nodev
#else
#define crlopen nodev
#define crlclose nodev
-#define crlread nodev
-#define crlwrite nodev
-int rx50open(),rx50close(),rx50read(),rx50write();
+int rx50open(),rx50close(),rx50rw();
#else
#define rx50open nodev
#define rx50close nodev
#else
#define rx50open nodev
#define rx50close nodev
-#define rx50read nodev
-#define rx50write nodev
-int flopen(),flclose(),flread(),flwrite();
+int flopen(),flclose(),flrw();
#else
#define flopen nodev
#define flclose nodev
#else
#define flopen nodev
#define flclose nodev
-#define flread nodev
-#define flwrite nodev
int syopen(),syread(),sywrite(),syioctl(),syselect();
int syopen(),syread(),sywrite(),syioctl(),syselect();
#define mmselect seltrue
#include "va.h"
#define mmselect seltrue
#include "va.h"
syopen, nulldev, syread, sywrite, /*2*/
syioctl, nulldev, nulldev, NULL,
syselect, nodev, NULL,
syopen, nulldev, syread, sywrite, /*2*/
syioctl, nulldev, nulldev, NULL,
syselect, nodev, NULL,
- nulldev, nulldev, mmread, mmwrite, /*3*/
+ nulldev, nulldev, mmrw, mmrw, /*3*/
nodev, nulldev, nulldev, NULL,
mmselect, nodev, NULL,
hpopen, hpclose, rawread, rawwrite, /*4*/
nodev, nulldev, nulldev, NULL,
mmselect, nodev, NULL,
hpopen, hpclose, rawread, rawwrite, /*4*/
nulldev, nulldev, rawread, rawwrite, /*7*/
nodev, nodev, nulldev, NULL,
nodev, nodev, swstrategy,
nulldev, nulldev, rawread, rawwrite, /*7*/
nodev, nodev, nulldev, NULL,
nodev, nodev, swstrategy,
- flopen, flclose, flread, flwrite, /*8*/
+ flopen, flclose, flrw, flrw, /*8*/
nodev, nodev, nulldev, NULL,
seltrue, nodev, NULL,
udaopen, udaclose, rawread, rawwrite, /*9*/
nodev, nodev, nulldev, NULL,
seltrue, nodev, NULL,
udaopen, udaclose, rawread, rawwrite, /*9*/
dhuopen, dhuclose, dhuread, dhuwrite, /*34*/
dhuioctl, dhustop, dhureset, dhu_tty,
ttselect, nodev, NULL,
dhuopen, dhuclose, dhuread, dhuwrite, /*34*/
dhuioctl, dhustop, dhureset, dhu_tty,
ttselect, nodev, NULL,
- crlopen, crlclose, crlread, crlwrite, /*35*/
+ crlopen, crlclose, crlrw, crlrw, /*35*/
nodev, nodev, nulldev, NULL,
seltrue, nodev, NULL,
vsopen, vsclose, nodev, nodev, /*36*/
nodev, nodev, nulldev, NULL,
seltrue, nodev, NULL,
vsopen, vsclose, nodev, nodev, /*36*/
nodev, nodev, nodev, nodev, /*50*/
nodev, nulldev, nulldev, NULL,
nodev, nodev, NULL,
nodev, nodev, nodev, nodev, /*50*/
nodev, nulldev, nulldev, NULL,
nodev, nodev, NULL,
- rx50open, rx50close, rx50read, rx50write, /*51*/
+ rx50open, rx50close, rx50rw, rx50rw, /*51*/
nodev, nodev, nulldev, 0,
seltrue, nodev, NULL,
/* kdb50 ra */
nodev, nodev, nulldev, 0,
seltrue, nodev, NULL,
/* kdb50 ra */
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)crl.c 7.1 (Berkeley) %G%
+ * @(#)crl.c 7.2 (Berkeley) %G%
*/
/*
* TO DO (tef 7/18/85):
*/
/*
* TO DO (tef 7/18/85):
crltab.crl_state = CRL_IDLE;
}
crltab.crl_state = CRL_IDLE;
}
-crloperation(rw, uio)
- enum uio_rw rw;
+/*ARGSUSED*/
+crlrw(dev, uio, flag)
+ dev_t dev;
{
register struct buf *bp;
register int i;
{
register struct buf *bp;
register int i;
- if (rw == UIO_WRITE) {
- error = uiomove(bp->b_un.b_addr, i, UIO_WRITE, uio);
+ if (uio->uio_rw == UIO_WRITE) {
+ error = uiomove(bp->b_un.b_addr, i, uio);
- bp->b_flags = rw == UIO_WRITE ? B_WRITE : B_READ;
+ bp->b_flags = uio->uio_rw == UIO_WRITE ? B_WRITE : B_READ;
s = spl4();
crlstart();
while ((bp->b_flags & B_DONE) == 0)
s = spl4();
crlstart();
while ((bp->b_flags & B_DONE) == 0)
- if (rw == UIO_READ) {
- error = uiomove(bp->b_un.b_addr, i, UIO_READ, uio);
+ if (uio->uio_rw == UIO_READ) {
+ error = uiomove(bp->b_un.b_addr, i, uio);
-/*ARGSUSED*/
-crlread(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
-
- return (crloperation(UIO_READ, uio));
-}
-
-/*ARGSUSED*/
-crlwrite(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
-
- return (crloperation(UIO_WRITE, uio));
-}
-
crlstart()
{
register struct buf *bp;
crlstart()
{
register struct buf *bp;
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)flp.c 7.1 (Berkeley) %G%
+ * @(#)flp.c 7.2 (Berkeley) %G%
-floperation(rw, uio)
- enum uio_rw rw;
+/*ARGSUSED*/
+flrw(dev, uio, flag)
+ dev_t dev;
{
register struct buf *bp;
register int i;
{
register struct buf *bp;
register int i;
- if (rw == UIO_WRITE) {
- error = uiomove(bp->b_un.b_addr, i, UIO_WRITE, uio);
+ if (uio->uio_rw == UIO_WRITE) {
+ error = uiomove(bp->b_un.b_addr, i, uio);
- bp->b_flags = rw == UIO_WRITE ? B_WRITE : B_READ;
+ bp->b_flags = uio->uio_rw == UIO_WRITE ? B_WRITE : B_READ;
(void) spl4();
flstart();
while ((bp->b_flags & B_DONE) == 0)
(void) spl4();
flstart();
while ((bp->b_flags & B_DONE) == 0)
- if (rw == UIO_READ) {
- error = uiomove(bp->b_un.b_addr, i, UIO_READ, uio);
+ if (uio->uio_rw == UIO_READ) {
+ error = uiomove(bp->b_un.b_addr, i, uio);
-/*ARGSUSED*/
-flread(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
-
- return (floperation(UIO_READ, uio));
-}
-
-/*ARGSUSED*/
-flwrite(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
-
- return (floperation(UIO_WRITE, uio));
-}
-
flstart()
{
register struct buf *bp;
flstart()
{
register struct buf *bp;
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)mem.c 7.1 (Berkeley) %G%
+ * @(#)mem.c 7.2 (Berkeley) %G%
dev_t dev;
struct uio *uio;
dev_t dev;
struct uio *uio;
-{
-
- return (mmrw(dev, uio, UIO_READ));
-}
-
-mmwrite(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
-
- return (mmrw(dev, uio, UIO_WRITE));
-}
-
-mmrw(dev, uio, rw)
- dev_t dev;
- struct uio *uio;
- enum uio_rw rw;
{
register int o;
register u_int c, v;
{
register int o;
register u_int c, v;
if (v >= physmem)
goto fault;
*(int *)mmap = v | PG_V |
if (v >= physmem)
goto fault;
*(int *)mmap = v | PG_V |
- (rw == UIO_READ ? PG_KR : PG_KW);
+ (uio->uio_rw == UIO_READ ? PG_KR : PG_KW);
mtpr(TBIS, vmmap);
o = (int)uio->uio_offset & PGOFSET;
c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
c = MIN(c, (u_int)(NBPG - o));
c = MIN(c, (u_int)iov->iov_len);
mtpr(TBIS, vmmap);
o = (int)uio->uio_offset & PGOFSET;
c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
c = MIN(c, (u_int)(NBPG - o));
c = MIN(c, (u_int)iov->iov_len);
- error = uiomove((caddr_t)&vmmap[o], (int)c, rw, uio);
+ error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
continue;
/* minor device 1 is kernel memory */
continue;
/* minor device 1 is kernel memory */
(caddr_t)uio->uio_offset < (caddr_t)&umbaend)
goto fault;
c = iov->iov_len;
(caddr_t)uio->uio_offset < (caddr_t)&umbaend)
goto fault;
c = iov->iov_len;
- if (!kernacc((caddr_t)uio->uio_offset, c, rw == UIO_READ ? B_READ : B_WRITE))
+ if (!kernacc((caddr_t)uio->uio_offset, c,
+ uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
- error = uiomove((caddr_t)uio->uio_offset, (int)c, rw, uio);
+ error = uiomove((caddr_t)uio->uio_offset, (int)c, uio);
continue;
/* minor device 2 is EOF/RATHOLE */
case 2:
continue;
/* minor device 2 is EOF/RATHOLE */
case 2:
+ if (uio->uio_rw == UIO_READ)
return (0);
c = iov->iov_len;
break;
return (0);
c = iov->iov_len;
break;
/* minor device 3 is unibus memory (addressed by shorts) */
case 3:
c = iov->iov_len;
/* minor device 3 is unibus memory (addressed by shorts) */
case 3:
c = iov->iov_len;
- if (!kernacc((caddr_t)uio->uio_offset, c, rw == UIO_READ ? B_READ : B_WRITE))
+ if (!kernacc((caddr_t)uio->uio_offset, c,
+ uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
- if (!useracc(iov->iov_base, c, rw == UIO_READ ? B_WRITE : B_READ))
+ if (!useracc(iov->iov_base, c,
+ uio->uio_rw == UIO_READ ? B_WRITE : B_READ))
goto fault;
error = UNIcpy((caddr_t)uio->uio_offset, iov->iov_base,
goto fault;
error = UNIcpy((caddr_t)uio->uio_offset, iov->iov_base,