mirror of https://gitee.com/openkylin/qemu.git
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:
parent
27f3f8a362
commit
32bb404a6a
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue