diff options
author | Markus Armbruster <armbru@redhat.com> | 2010-02-25 11:23:52 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-03-09 08:47:20 -0600 |
commit | 32bb404a6a4d726dfd691f75704f08257ce65ffe (patch) | |
tree | e7a743dc70485cf19e765a41e5ca92adad6cdb4e /hw | |
parent | 27f3f8a362570c5e9eb89b36b6c6d5db7b6e70e3 (diff) |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/scsi-disk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 522f521649..8f7ffc143d 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 { |