aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2012-02-21 23:18:48 -0800
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-22 09:02:17 -0600
commit1e9eb78a879cdfedc3831cae92552c9b3fdcc04b (patch)
tree1a37c44c1421a1cd7a7f959f0b90cafe37ed9c87
parent4732dcaf5a82561a5a9f9e4bc9adedbec5f3e9ec (diff)
blockdev: allow read-only pflash devices
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--blockdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c
index 7a6613a2d2..2c132a308b 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;
}