« Previous | Next » 

Revision 65d21bc7


Added by Markus Armbruster over 10 years ago

raw-posix: Fix test for host CD-ROM

raw_pread_aligned() retries up to two times if the block device backs
a virtual CD-ROM (a drive with media=cdrom and if=ide, scsi, xen or
none). This makes no sense. Whether retrying reads can correct read
errors can only depend on what we're reading, not on how the result
gets used. We need to check what whether we're reading from a
physical CD-ROM or floppy here.

I doubt retrying is useful even then. Left for another day.


  • Virtual CD-ROM backed by host_cdrom behaves the same.
  • Virtual CD-ROM backed by file or host_device no longer retries.
  • A drive backed by host_cdrom now retries even if it's not a virtual
  • Any drive backed by host_floppy now retries.

While there, clean up gratuitous use of goto.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences