blockdev: allow read-only pflash devices
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 22 Feb 2012 07:18:48 +0000 (23:18 -0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 22 Feb 2012 15:02:17 +0000 (09:02 -0600)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
blockdev.c

index 7a6613a2d248798f3dcb4913c3dbf54176c95b33..2c132a308bc1d1ff3104ae25e1798281043e91a2 100644 (file)
@@ -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;
         }