Patchwork [v11,1/9] blockdev: allow read-only pflash devices

login
register
mail settings
Submitter jordan.l.justen@intel.com
Date Feb. 22, 2012, 7:18 a.m.
Message ID <1329895136-20494-2-git-send-email-jordan.l.justen@intel.com>
Download mbox | patch
Permalink /patch/142412/
State New
Headers show

Comments

jordan.l.justen@intel.com - Feb. 22, 2012, 7:18 a.m.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
 blockdev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/blockdev.c b/blockdev.c
index 7a6613a..2c132a3 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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;
         }