aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-02-25 11:23:52 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-09 08:47:20 -0600
commit32bb404a6a4d726dfd691f75704f08257ce65ffe (patch)
treee7a743dc70485cf19e765a41e5ca92adad6cdb4e
parent27f3f8a362570c5e9eb89b36b6c6d5db7b6e70e3 (diff)
downloadqemu-32bb404a6a4d726dfd691f75704f08257ce65ffe.zip
qemu-32bb404a6a4d726dfd691f75704f08257ce65ffe.tar.gz
qemu-32bb404a6a4d726dfd691f75704f08257ce65ffe.tar.bz2
scsi: Make device scsi-disk reject /dev/sg*
You're supposed to use scsi-generic for that. Which rejects anything but /dev/sg*. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/scsi-disk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 522f521..8f7ffc1 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -1031,6 +1031,11 @@ static int scsi_disk_initfn(SCSIDevice *dev)
}
s->bs = s->qdev.conf.dinfo->bdrv;
+ if (bdrv_is_sg(s->bs)) {
+ qemu_error("scsi-disk: unwanted /dev/sg*\n");
+ return -1;
+ }
+
if (bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM) {
s->cluster_size = 4;
} else {