mirror of
https://github.com/xemu-project/xemu.git
synced 2026-11-11 00:28:59 +01:00
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:
1 parent
27f3f8a362
commit
32bb404a6a
1 file changed
+5
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user