From 1e9eb78a879cdfedc3831cae92552c9b3fdcc04b Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 21 Feb 2012 23:18:48 -0800 Subject: [PATCH] blockdev: allow read-only pflash devices Signed-off-by: Jordan Justen Signed-off-by: Anthony Liguori --- blockdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }