summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-12 20:14:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-12 20:14:23 +0000
commit484706ec2d7791c35fcf9aea53e46db186855c74 (patch)
tree3d2213335f07ea3bcef028e0ee89bcf36258d56e /sys
parent7efd11ee0a75359626f6ca230fde36caa23cf83b (diff)
update to new cdio.h
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isa/mcd.c57
1 files changed, 33 insertions, 24 deletions
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 615d6b0af4c..6b1d267a460 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1352,17 +1352,20 @@ mcd_toc_entries(sc, te)
data.entries[n].track = bcd2bin(sc->toc[trk].toc.idx_no);
switch (te->address_format) {
case CD_MSF_FORMAT:
- data.entries[n].addr[0] = 0;
- data.entries[n].addr[1] = bcd2bin(sc->toc[trk].toc.absolute_pos[0]);
- data.entries[n].addr[2] = bcd2bin(sc->toc[trk].toc.absolute_pos[1]);
- data.entries[n].addr[3] = bcd2bin(sc->toc[trk].toc.absolute_pos[2]);
+ data.entries[n].addr.addr[0] = 0;
+ data.entries[n].addr.addr[1] =
+ bcd2bin(sc->toc[trk].toc.absolute_pos[0]);
+ data.entries[n].addr.addr[2] =
+ bcd2bin(sc->toc[trk].toc.absolute_pos[1]);
+ data.entries[n].addr.addr[3] =
+ bcd2bin(sc->toc[trk].toc.absolute_pos[2]);
break;
case CD_LBA_FORMAT:
lba = msf2hsg(sc->toc[trk].toc.absolute_pos, 0);
- data.entries[n].addr[0] = lba >> 24;
- data.entries[n].addr[1] = lba >> 16;
- data.entries[n].addr[2] = lba >> 8;
- data.entries[n].addr[3] = lba;
+ data.entries[n].addr.addr[0] = lba >> 24;
+ data.entries[n].addr.addr[1] = lba >> 16;
+ data.entries[n].addr.addr[2] = lba >> 8;
+ data.entries[n].addr.addr[3] = lba;
break;
}
n++;
@@ -1472,14 +1475,20 @@ mcd_read_subchannel(sc, ch)
data.what.position.index_number = bcd2bin(q.current.idx_no);
switch (ch->address_format) {
case CD_MSF_FORMAT:
- data.what.position.reladdr[0] = 0;
- data.what.position.reladdr[1] = bcd2bin(q.current.relative_pos[0]);
- data.what.position.reladdr[2] = bcd2bin(q.current.relative_pos[1]);
- data.what.position.reladdr[3] = bcd2bin(q.current.relative_pos[2]);
- data.what.position.absaddr[0] = 0;
- data.what.position.absaddr[1] = bcd2bin(q.current.absolute_pos[0]);
- data.what.position.absaddr[2] = bcd2bin(q.current.absolute_pos[1]);
- data.what.position.absaddr[3] = bcd2bin(q.current.absolute_pos[2]);
+ data.what.position.reladdr.addr[0] = 0;
+ data.what.position.reladdr.addr[1] =
+ bcd2bin(q.current.relative_pos[0]);
+ data.what.position.reladdr.addr[2] =
+ bcd2bin(q.current.relative_pos[1]);
+ data.what.position.reladdr.addr[3] =
+ bcd2bin(q.current.relative_pos[2]);
+ data.what.position.absaddr.addr[0] = 0;
+ data.what.position.absaddr.addr[1] =
+ bcd2bin(q.current.absolute_pos[0]);
+ data.what.position.absaddr.addr[2] =
+ bcd2bin(q.current.absolute_pos[1]);
+ data.what.position.absaddr.addr[3] =
+ bcd2bin(q.current.absolute_pos[2]);
break;
case CD_LBA_FORMAT:
lba = msf2hsg(q.current.relative_pos, 1);
@@ -1490,15 +1499,15 @@ mcd_read_subchannel(sc, ch)
*/
if (data.what.position.index_number == 0x00)
lba = -lba;
- data.what.position.reladdr[0] = lba >> 24;
- data.what.position.reladdr[1] = lba >> 16;
- data.what.position.reladdr[2] = lba >> 8;
- data.what.position.reladdr[3] = lba;
+ data.what.position.reladdr.addr[0] = lba >> 24;
+ data.what.position.reladdr.addr[1] = lba >> 16;
+ data.what.position.reladdr.addr[2] = lba >> 8;
+ data.what.position.reladdr.addr[3] = lba;
lba = msf2hsg(q.current.absolute_pos, 0);
- data.what.position.absaddr[0] = lba >> 24;
- data.what.position.absaddr[1] = lba >> 16;
- data.what.position.absaddr[2] = lba >> 8;
- data.what.position.absaddr[3] = lba;
+ data.what.position.absaddr.addr[0] = lba >> 24;
+ data.what.position.absaddr.addr[1] = lba >> 16;
+ data.what.position.absaddr.addr[2] = lba >> 8;
+ data.what.position.absaddr.addr[3] = lba;
break;
}
break;