Revision 4f8a066b blockdev.c
b/blockdev.c | ||
---|---|---|
528 | 528 |
if (media == MEDIA_CDROM) { |
529 | 529 |
/* CDROM is fine for any interface, don't check. */ |
530 | 530 |
ro = 1; |
531 |
} else if (ro == 1) { |
|
532 |
if (type != IF_SCSI && type != IF_VIRTIO && type != IF_FLOPPY && |
|
533 |
type != IF_NONE && type != IF_PFLASH) { |
|
534 |
error_report("read-only not supported by this bus type"); |
|
535 |
goto err; |
|
536 |
} |
|
537 | 531 |
} |
538 | 532 |
|
539 | 533 |
bdrv_flags |= ro ? 0 : BDRV_O_RDWR; |
Also available in: Unified diff