Commit 1e9eb78a authored by Jordan Justen's avatar Jordan Justen Committed by Anthony Liguori
Browse files

blockdev: allow read-only pflash devices

parent 4732dcaf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -595,7 +595,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
        /* CDROM is fine for any interface, don't check.  */
        ro = 1;
    } else if (ro == 1) {
        if (type != IF_SCSI && type != IF_VIRTIO && type != IF_FLOPPY && type != IF_NONE) {
        if (type != IF_SCSI && type != IF_VIRTIO && type != IF_FLOPPY &&
            type != IF_NONE && type != IF_PFLASH) {
            error_report("readonly not supported by this bus type");
            goto err;
        }