SCCS-vsn: sys/vax/stand/hp.c 7.13
SCCS-vsn: sys/vax/stand/ht.c 7.7
SCCS-vsn: sys/vax/stand/idc.c 7.7
SCCS-vsn: sys/vax/stand/kdb.c 7.9
SCCS-vsn: sys/vax/stand/mt.c 7.7
SCCS-vsn: sys/vax/stand/rk.c 7.10
SCCS-vsn: sys/vax/stand/rl.c 7.9
SCCS-vsn: sys/vax/stand/tm.c 7.8
SCCS-vsn: sys/vax/stand/tmscp.c 7.7
SCCS-vsn: sys/vax/stand/ts.c 7.8
SCCS-vsn: sys/vax/stand/uda.c 7.12
SCCS-vsn: sys/vax/stand/up.c 7.11
SCCS-vsn: sys/vax/stand/ut.c 7.8
13 files changed:
* 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.
*
- * @(#)hp.c 7.12 (Berkeley) %G%
+ * @(#)hp.c 7.13 (Berkeley) %G%
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
- if (hpstrategy(&tio, READ) != SECTSIZ)
+ if (hpstrategy(&tio, F_READ) != SECTSIZ)
error = ERDLAB;
dlp = (struct disklabel *)(lbuf + LABELOFFSET);
if (error == 0 && (dlp->d_magic != DISKMAGIC ||
error = ERDLAB;
dlp = (struct disklabel *)(lbuf + LABELOFFSET);
if (error == 0 && (dlp->d_magic != DISKMAGIC ||
tio.i_ma = (char *)&hpbad[io->i_adapt][unit];
tio.i_cc = sizeof(struct dkbad);
for (i = 0; i < 5; i++) {
tio.i_ma = (char *)&hpbad[io->i_adapt][unit];
tio.i_cc = sizeof(struct dkbad);
for (i = 0; i < 5; i++) {
- if (hpstrategy(&tio, READ) == sizeof(struct dkbad))
+ if (hpstrategy(&tio, F_READ) == sizeof(struct dkbad))
* 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.
*
- * @(#)ht.c 7.6 (Berkeley) %G%
+ * @(#)ht.c 7.7 (Berkeley) %G%
htaddr->htcs1 = HT_SREV|HT_GO;
return (0);
}
htaddr->htcs1 = HT_SREV|HT_GO;
return (0);
}
- if (func == READ || func == WRITE)
+ if (func == F_READ || func == F_WRITE)
mbastart(io, io->i_ctlr, func);
else
htaddr->htcs1 = func|HT_GO;
mbastart(io, io->i_ctlr, func);
else
htaddr->htcs1 = func|HT_GO;
* 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.
*
- * @(#)idc.c 7.6 (Berkeley) %G%
+ * @(#)idc.c 7.7 (Berkeley) %G%
idcwait(idcaddr);
idcaddr->idccsr &= ~IDC_ATTN;
com = dn<<8;
idcwait(idcaddr);
idcaddr->idccsr &= ~IDC_ATTN;
com = dn<<8;
com |= IDC_READ;
else
com |= IDC_WRITE;
com |= IDC_READ;
else
com |= IDC_WRITE;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kdb.c 7.8 (Berkeley) %G%
+ * @(#)kdb.c 7.9 (Berkeley) %G%
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
- if (krastrategy(&tio, READ) != SECTSIZ)
+ if (krastrategy(&tio, F_READ) != SECTSIZ)
return (ERDLAB);
*lp = *(struct disklabel *)(lbuf + LABELOFFSET);
if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC) {
return (ERDLAB);
*lp = *(struct disklabel *)(lbuf + LABELOFFSET);
if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC) {
mp->mscp_seq.seq_lbn = io->i_bn;
mp->mscp_seq.seq_bytecount = io->i_cc;
mp->mscp_seq.seq_buffer = (long)io->i_ma | KDB_PHYS;
mp->mscp_seq.seq_lbn = io->i_bn;
mp->mscp_seq.seq_bytecount = io->i_cc;
mp->mscp_seq.seq_buffer = (long)io->i_ma | KDB_PHYS;
- if (kdbcmd(func == READ ? M_OP_READ : M_OP_WRITE, io)) {
+ if (kdbcmd(func == F_READ ? M_OP_READ : M_OP_WRITE, io)) {
printf("kra: I/O error\n");
return (-1);
}
printf("kra: I/O error\n");
return (-1);
}
* 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.
*
- * @(#)mt.c 7.6 (Berkeley) %G%
+ * @(#)mt.c 7.7 (Berkeley) %G%
mtaddr->mtas = mtaddr->mtas;
}
mtaddr->mtas = mtaddr->mtas;
}
- if (func == READ || func == WRITE) {
+ if (func == F_READ || func == F_WRITE) {
mtaddr->mtca = 1<<2; /* 1 record */
mtaddr->mtbc = io->i_cc;
mbastart(io, io->i_ctlr, func);
mtaddr->mtca = 1<<2; /* 1 record */
mtaddr->mtbc = io->i_cc;
mbastart(io, io->i_ctlr, func);
* 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.
*
- * @(#)rk.c 7.9 (Berkeley) %G%
+ * @(#)rk.c 7.10 (Berkeley) %G%
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
- if (rkstrategy(&tio, READ) != SECTSIZ)
+ if (rkstrategy(&tio, F_READ) != SECTSIZ)
return (ERDLAB);
*lp = *(struct disklabel *)(lbuf + LABELOFFSET);
if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC)
return (ERDLAB);
*lp = *(struct disklabel *)(lbuf + LABELOFFSET);
if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC)
rkaddr->rkba = ubinfo;
rkaddr->rkwc = -(io->i_cc >> 1);
com = RK_CDT|((ubinfo>>8)&0x300)|RK_GO;
rkaddr->rkba = ubinfo;
rkaddr->rkwc = -(io->i_cc >> 1);
com = RK_CDT|((ubinfo>>8)&0x300)|RK_GO;
com |= RK_READ;
else
com |= RK_WRITE;
com |= RK_READ;
else
com |= RK_WRITE;
* 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.
*
- * @(#)rl.c 7.8 (Berkeley) %G%
+ * @(#)rl.c 7.9 (Berkeley) %G%
com = (st->rl_dn << 8) | ((ubaaddr>>12)&RL_BAE);
com = (st->rl_dn << 8) | ((ubaaddr>>12)&RL_BAE);
com |= RL_READ;
else
com |= RL_WRITE;
com |= RL_READ;
else
com |= RL_WRITE;
* 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.
*
- * @(#)tm.c 7.7 (Berkeley) %G%
+ * @(#)tm.c 7.8 (Berkeley) %G%
tmaddr->tmbc = -io->i_cc;
tmaddr->tmba = info;
com = (io->i_unit<<8) | TM_GO;
tmaddr->tmbc = -io->i_cc;
tmaddr->tmba = info;
com = (io->i_unit<<8) | TM_GO;
tmaddr->tmcs = com | TM_RCOM;
tmaddr->tmcs = com | TM_RCOM;
- else if (func == WRITE)
+ else if (func == F_WRITE)
tmaddr->tmcs = com | TM_WCOM;
else if (func == TM_SREV) {
tmaddr->tmbc = -1;
tmaddr->tmcs = com | TM_WCOM;
else if (func == TM_SREV) {
tmaddr->tmbc = -1;
-/* @(#)tmscp.c 7.6 (Berkeley) %G% */
+/* @(#)tmscp.c 7.7 (Berkeley) %G% */
/****************************************************************
* *
/****************************************************************
* *
mp->mscp_unit = io->i_unit&03;
mp->mscp_bytecnt = io->i_cc;
mp->mscp_buffer = (ubinfo & 0x3fffff) | (((ubinfo>>28)&0xf)<<24);
mp->mscp_unit = io->i_unit&03;
mp->mscp_bytecnt = io->i_cc;
mp->mscp_buffer = (ubinfo & 0x3fffff) | (((ubinfo>>28)&0xf)<<24);
- if ((mp = tmscpcmd(func == READ ? M_OP_READ : M_OP_WRITE, 0)) == 0) {
+ if ((mp = tmscpcmd(func == F_READ ? M_OP_READ : M_OP_WRITE, 0)) == 0) {
ubafree(io, ubinfo);
printf("tms: I/O error\n");
return(-1);
ubafree(io, ubinfo);
printf("tms: I/O error\n");
return(-1);
* 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.
*
- * @(#)ts.c 7.7 (Berkeley) %G%
+ * @(#)ts.c 7.8 (Berkeley) %G%
ts.ts_cmd.c_size = io->i_cc;
ts.ts_cmd.c_loba = info;
ts.ts_cmd.c_hiba = (info>>16)&3;
ts.ts_cmd.c_size = io->i_cc;
ts.ts_cmd.c_loba = info;
ts.ts_cmd.c_hiba = (info>>16)&3;
- else if (func == WRITE)
+ else if (func == F_WRITE)
func = TS_WCOM;
}
ts.ts_cmd.c_cmd = TS_ACK|TS_CVC|func;
func = TS_WCOM;
}
ts.ts_cmd.c_cmd = TS_ACK|TS_CVC|func;
* 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.
*
- * @(#)uda.c 7.11 (Berkeley) %G%
+ * @(#)uda.c 7.12 (Berkeley) %G%
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
- if (rastrategy(&tio, READ) != SECTSIZ)
+ if (rastrategy(&tio, F_READ) != SECTSIZ)
return (ERDLAB);
*lp = *(struct disklabel *)(lbuf + LABELOFFSET);
if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC) {
return (ERDLAB);
*lp = *(struct disklabel *)(lbuf + LABELOFFSET);
if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC) {
mp->mscp_seq.seq_lbn = io->i_bn;
mp->mscp_seq.seq_bytecount = io->i_cc;
mp->mscp_seq.seq_buffer = UBAI_ADDR(ubinfo) | (UBAI_BDP(ubinfo) << 24);
mp->mscp_seq.seq_lbn = io->i_bn;
mp->mscp_seq.seq_bytecount = io->i_cc;
mp->mscp_seq.seq_buffer = UBAI_ADDR(ubinfo) | (UBAI_BDP(ubinfo) << 24);
- if (udcmd(func == READ ? M_OP_READ : M_OP_WRITE, io)) {
+ if (udcmd(func == F_READ ? M_OP_READ : M_OP_WRITE, io)) {
printf("ra: I/O error\n");
ubafree(io, ubinfo);
return (-1);
printf("ra: I/O error\n");
ubafree(io, ubinfo);
return (-1);
* 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.
*
- * @(#)up.c 7.10 (Berkeley) %G%
+ * @(#)up.c 7.11 (Berkeley) %G%
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
tio.i_ma = lbuf;
tio.i_cc = SECTSIZ;
tio.i_flgs |= F_RDDATA;
- if (upstrategy(&tio, READ) != SECTSIZ)
+ if (upstrategy(&tio, F_READ) != SECTSIZ)
error = ERDLAB;
dlp = (struct disklabel *)(lbuf + LABELOFFSET);
if (error == 0 && (dlp->d_magic != DISKMAGIC ||
error = ERDLAB;
dlp = (struct disklabel *)(lbuf + LABELOFFSET);
if (error == 0 && (dlp->d_magic != DISKMAGIC ||
tio.i_cc = sizeof(struct dkbad);
tio.i_flgs |= F_RDDATA;
for (i = 0; i < 5; i++) {
tio.i_cc = sizeof(struct dkbad);
tio.i_flgs |= F_RDDATA;
for (i = 0; i < 5; i++) {
- if (upstrategy(&tio, READ) == sizeof(struct dkbad))
+ if (upstrategy(&tio, F_READ) == sizeof(struct dkbad))
upaddr->upcs1 = UP_SEEK|UP_GO;
upwaitdry(upaddr);
}
upaddr->upcs1 = UP_SEEK|UP_GO;
upwaitdry(upaddr);
}
- if (io->i_errcnt >= 16 && (func & READ)) {
+ if (io->i_errcnt >= 16 && (func & F_READ)) {
upaddr->upof = up_offset[io->i_errcnt & 017] | UPOF_FMT22;
upaddr->upcs1 = UP_OFFSET|UP_GO;
upwaitdry(upaddr);
upaddr->upof = up_offset[io->i_errcnt & 017] | UPOF_FMT22;
upaddr->upcs1 = UP_OFFSET|UP_GO;
upwaitdry(upaddr);
* 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.
*
- * @(#)ut.c 7.7 (Berkeley) %G%
+ * @(#)ut.c 7.8 (Berkeley) %G%
info = ubasetup(io, 1);
addr->utwc = -((io->i_cc+1) >> 1);
addr->utfc = -io->i_cc;
info = ubasetup(io, 1);
addr->utwc = -((io->i_cc+1) >> 1);
addr->utfc = -io->i_cc;
addr->utba = info;
addr->utcs1 = UT_RCOM | ((info>>8) & 0x30) | UT_GO;
addr->utba = info;
addr->utcs1 = UT_RCOM | ((info>>8) & 0x30) | UT_GO;
- } else if (func == WRITE) {
+ } else if (func == F_WRITE) {
addr->utba = info;
addr->utcs1 = UT_WCOM | ((info>>8) & 0x30) | UT_GO;
} else if (func == UT_SREV) {
addr->utba = info;
addr->utcs1 = UT_WCOM | ((info>>8) & 0x30) | UT_GO;
} else if (func == UT_SREV) {
addr->utcs1 = UT_CLEAR | UT_GO;
utstrategy(io, UT_SREV);
utquiet(addr);
addr->utcs1 = UT_CLEAR | UT_GO;
utstrategy(io, UT_SREV);
utquiet(addr);
addr->utcs1 = UT_ERASE | UT_GO;
UTWAIT(addr);
}
addr->utcs1 = UT_ERASE | UT_GO;
UTWAIT(addr);
}
if (errcnt)
printf("ut: recovered by retry\n");
done:
if (errcnt)
printf("ut: recovered by retry\n");
done:
resid = 0;
if (io->i_cc > MASKREG(addr->utfc))
resid = io->i_cc - MASKREG(addr->utfc);
resid = 0;
if (io->i_cc > MASKREG(addr->utfc))
resid = io->i_cc - MASKREG(addr->utfc);