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>
This commit is contained in:
Markus Armbruster 2010-02-25 11:23:52 +01:00 committed by Anthony Liguori
parent 27f3f8a362
commit 32bb404a6a
1 changed files with 5 additions and 0 deletions

View File

@ -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 {