aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-29 15:39:59 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-29 15:39:59 +0000
commitee16b24ac827de58c85ef65189e0888cdf9382bc (patch)
tree8fff90aad2f8fcbbb132f8ba09e3e00b7bcd362e /hw
parent6d0662746bf66fa01337a776be17ff1f3ad7d342 (diff)
misc scsi disk/cdrom fixes/improvements 1/4
Use correct sector size for cdrom Read TOC command Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6951 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi-disk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index c4d7d520b8..da3fa417be 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -790,6 +790,7 @@ static int32_t scsi_send_command(SCSIDevice *d, uint32_t tag,
start_track = buf[6];
bdrv_get_geometry(s->bdrv, &nb_sectors);
DPRINTF("Read TOC (track %d format %d msf %d)\n", start_track, format, msf >> 1);
+ nb_sectors /= s->cluster_size;
switch(format) {
case 0:
toclen = cdrom_read_toc(nb_sectors, outbuf, msf, start_track);