merge in vnodes
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 10 May 1989 11:57:15 +0000 (03:57 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 10 May 1989 11:57:15 +0000 (03:57 -0800)
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

usr/src/sys/vax/vax/conf.c
usr/src/sys/vax/vax/crl.c
usr/src/sys/vax/vax/flp.c
usr/src/sys/vax/vax/mem.c

index 6cedab6..234f4a8 100644 (file)
@@ -3,7 +3,7 @@
  * 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%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -301,30 +301,27 @@ struct    tty dmf_tty[];
 #endif
 
 #if VAX8600
 #endif
 
 #if VAX8600
-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
+#define        crlrw           nodev
 #endif
 
 #if VAX8200
 #endif
 
 #if VAX8200
-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
+#define        rx50rw          nodev
 #endif
 
 #if VAX780
 #endif
 
 #if VAX780
-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
+#define        flrw    nodev
 #endif
 
 #include "dz.h"
 #endif
 
 #include "dz.h"
@@ -354,7 +351,7 @@ int lpopen(),lpclose(),lpwrite(),lpreset();
 
 int    syopen(),syread(),sywrite(),syioctl(),syselect();
 
 
 int    syopen(),syread(),sywrite(),syioctl(),syselect();
 
-int    mmread(),mmwrite();
+int    mmrw();
 #define        mmselect        seltrue
 
 #include "va.h"
 #define        mmselect        seltrue
 
 #include "va.h"
@@ -595,7 +592,7 @@ struct cdevsw       cdevsw[] =
        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*/
@@ -610,7 +607,7 @@ struct cdevsw       cdevsw[] =
        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*/
@@ -692,7 +689,7 @@ struct cdevsw       cdevsw[] =
        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*/
@@ -741,7 +738,7 @@ struct cdevsw       cdevsw[] =
        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 */
index 54e20e4..2744f08 100644 (file)
@@ -3,7 +3,7 @@
  * 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):
@@ -63,9 +63,11 @@ crlclose(dev, flag)
        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;
        struct uio *uio;
        struct uio *uio;
+       int flag;
 {
        register struct buf *bp;
        register int i;
 {
        register struct buf *bp;
        register int i;
@@ -88,12 +90,12 @@ crloperation(rw, uio)
                        error = EIO;
                        break;
                }
                        error = EIO;
                        break;
                }
-               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);
                        if (error)
                                break;
                }
                        if (error)
                                break;
                }
-               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)
@@ -103,8 +105,8 @@ crloperation(rw, uio)
                        error = EIO;
                        break;
                }
                        error = EIO;
                        break;
                }
-               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);
                        if (error)
                                break;
                }
                        if (error)
                                break;
                }
@@ -114,24 +116,6 @@ crloperation(rw, uio)
        return (error);
 }
 
        return (error);
 }
 
-/*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;
index e4a29a1..9d17141 100644 (file)
@@ -3,7 +3,7 @@
  * 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%
  */
 
 #if VAX780
  */
 
 #if VAX780
@@ -55,9 +55,11 @@ flclose(dev, flag)
        fltab.fl_state = 0;
 }
 
        fltab.fl_state = 0;
 }
 
-floperation(rw, uio)
-       enum uio_rw rw;
+/*ARGSUSED*/
+flrw(dev, uio, flag)
+       dev_t dev;
        struct uio *uio;
        struct uio *uio;
+       int flag;
 {
        register struct buf *bp;
        register int i;
 {
        register struct buf *bp;
        register int i;
@@ -88,12 +90,12 @@ floperation(rw, uio)
                        error = ENXIO;
                        break;
                }
                        error = ENXIO;
                        break;
                }
-               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);
                        if (error)
                                break;
                }
                        if (error)
                                break;
                }
-               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)
@@ -103,8 +105,8 @@ floperation(rw, uio)
                        error = EIO;
                        break;
                }
                        error = EIO;
                        break;
                }
-               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);
                        if (error)
                                break;
                }
                        if (error)
                                break;
                }
@@ -114,24 +116,6 @@ floperation(rw, uio)
        return (error);
 }
 
        return (error);
 }
 
-/*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;
index e3afe7e..dff4545 100644 (file)
@@ -3,7 +3,7 @@
  * 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%
  */
 
 /*
  */
 
 /*
 
 #include "mtpr.h"
 
 
 #include "mtpr.h"
 
-mmread(dev, uio)
+mmrw(dev, uio, flags)
        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;
+       int flags;
 {
        register int o;
        register u_int c, v;
 {
        register int o;
        register u_int c, v;
@@ -69,13 +53,13 @@ mmrw(dev, uio, rw)
                        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 */
@@ -87,14 +71,15 @@ mmrw(dev, uio, rw)
                            (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))
                                goto fault;
                                goto fault;
-                       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 (rw == UIO_READ)
+                       if (uio->uio_rw == UIO_READ)
                                return (0);
                        c = iov->iov_len;
                        break;
                                return (0);
                        c = iov->iov_len;
                        break;
@@ -102,12 +87,14 @@ mmrw(dev, uio, rw)
 /* 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))
                                goto fault;
                                goto fault;
-                       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,
-                           (int)c, rw);
+                           (int)c, uio->uio_rw);
                        break;
                }
                if (error)
                        break;
                }
                if (error)