Revision c79662f7 hw/scsi-disk.c

b/hw/scsi-disk.c
633 633
            memset(p, 0, 4);
634 634
            outbuf[1] = 0; /* Default media type.  */
635 635
            outbuf[3] = 0; /* Block descriptor length.  */
636
            if (bdrv_get_type_hint(s->dinfo->bdrv) == BDRV_TYPE_CDROM) {
636
            if (bdrv_get_type_hint(s->dinfo->bdrv) == BDRV_TYPE_CDROM ||
637
                bdrv_is_read_only(s->dinfo->bdrv)) {
637 638
                outbuf[2] = 0x80; /* Readonly.  */
638 639
            }
639 640
            p += 4;

Also available in: Unified diff