From ee16b24ac827de58c85ef65189e0888cdf9382bc Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Sun, 29 Mar 2009 15:39:59 +0000 Subject: misc scsi disk/cdrom fixes/improvements 1/4 Use correct sector size for cdrom Read TOC command Signed-off-by: Juergen Lock git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6951 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/scsi-disk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/scsi-disk.c') 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); -- cgit v1.2.3