READ, WRITE -> F_READ, F_WRITE
[unix-history] / usr / src / sys / tahoe / stand / vd.c
index af2038c..28ddbeb 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)vd.c        7.15 (Berkeley) %G%
+ *     @(#)vd.c        7.18 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
 
 #include "sys/param.h"
 #include "sys/time.h"
 
 #include "sys/param.h"
 #include "sys/time.h"
-#include "sys/vnode.h"
-#include "ufs/inode.h"
-#include "ufs/fs.h"
 #include "sys/buf.h"
 #include "sys/disklabel.h"
 #include "sys/buf.h"
 #include "sys/disklabel.h"
-#include "saio.h"
+#include "stand/saio.h"
 
 
-#include "tahoevba/vdreg.h"
-#include "tahoevba/vbaparam.h"
+#include "../vba/vdreg.h"
+#include "../vba/vbaparam.h"
 
 #define        COMPAT_42       1
 
 
 #define        COMPAT_42       1
 
@@ -78,7 +75,7 @@ vdopen(io)
                tio.i_ma = lbuf;
                tio.i_cc = DEV_BSIZE;
                tio.i_flgs |= F_RDDATA;
                tio.i_ma = lbuf;
                tio.i_cc = DEV_BSIZE;
                tio.i_flgs |= F_RDDATA;
-               if (vdstrategy(&tio, READ) != DEV_BSIZE)
+               if (vdstrategy(&tio, F_READ) != DEV_BSIZE)
                        return (ERDLAB);
                dlp = (struct disklabel *)(lbuf + LABELOFFSET);
                if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC)
                        return (ERDLAB);
                dlp = (struct disklabel *)(lbuf + LABELOFFSET);
                if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC)
@@ -262,7 +259,7 @@ vdstrategy(io, cmd)
        sn = sn % lp->d_nsectors;
 
 top:
        sn = sn % lp->d_nsectors;
 
 top:
-       dcb.opcode = (cmd == READ ? VDOP_RD : VDOP_WD);
+       dcb.opcode = (cmd == F_READ ? VDOP_RD : VDOP_WD);
        dcb.intflg = DCBINT_NONE;
        dcb.nxtdcb = (struct dcb *)0;   /* end of chain */
        dcb.operrsta  = 0;
        dcb.intflg = DCBINT_NONE;
        dcb.nxtdcb = (struct dcb *)0;   /* end of chain */
        dcb.operrsta  = 0;
@@ -285,7 +282,7 @@ top:
                if (retries++ == 0 && vdreset_ctlr(ctlr, io->i_unit) == 0 &&
                    vdreset_drive(io))
                        goto top;
                if (retries++ == 0 && vdreset_ctlr(ctlr, io->i_unit) == 0 &&
                    vdreset_drive(io))
                        goto top;
-               vderror(io->i_unit, cmd == READ ? "read" : "write", &dcb);
+               vderror(io->i_unit, cmd == F_READ ? "read" : "write", &dcb);
                io->i_error = EIO;
                return (-1);
        }
                io->i_error = EIO;
                return (-1);
        }