diff options
author | Arne Meyer <meyer.arne83@netcologne.de> | 2022-10-01 10:35:19 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2022-10-01 10:35:19 +0000 |
commit | e7b26bd4dfdd4dcb04a5a339e1ed87206fc9e83e (patch) | |
tree | 89d3f15e239a89dbad1bb56cb99abfbdc2acc565 /sys/src/cmd/cdfs/mmc.c | |
parent | 6d9b3408d945fc9645c27b42db0a9918752324fd (diff) |
cdfs: handle block sizes correctly
The Readblock enum does not work when you try to read audio cds.
4 cdda blocks are lager than 8192 and the command fails (at least
when using an usb cd drive). This sets the block count according
to the track block size. With this and the fix for libdisk I can
rip audio cds on my el cheapo usb dvd drive. Tested with
"Midnight Oil - Blue Sky Mining"
Diffstat (limited to 'sys/src/cmd/cdfs/mmc.c')
-rw-r--r-- | sys/src/cmd/cdfs/mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/cdfs/mmc.c b/sys/src/cmd/cdfs/mmc.c index cd0585c53..f749c4d78 100644 --- a/sys/src/cmd/cdfs/mmc.c +++ b/sys/src/cmd/cdfs/mmc.c @@ -1171,7 +1171,7 @@ mmcopenrd(Drive *drive, int trackno) o->track = &drive->track[trackno]; o->nchange = drive->nchange; o->omode = OREAD; - o->buf = bopen(mmcread, OREAD, o->track->bs, Readblock); + o->buf = bopen(mmcread, OREAD, o->track->bs, Maxrpc/o->track->bs); o->buf->otrack = o; aux->nropen++; @@ -1395,7 +1395,7 @@ mmccreate(Drive *drive, int type) o->nchange = drive->nchange; o->omode = OWRITE; o->track = t; - o->buf = bopen(mmcwrite, OWRITE, bs, Readblock); + o->buf = bopen(mmcwrite, OWRITE, bs, Maxrpc/bs); o->buf->otrack = o; aux->nwopen++; |