On 02/25/2010 04:23 AM, Markus Armbruster wrote:
You're supposed to use scsi-generic for that.  Which rejects anything
but /dev/sg*.

Signed-off-by: Markus Armbruster<arm...@redhat.com>
---

Applied.  Thanks.

Regards,

Anthony Liguori

  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 b2f61fe..ad8eb24 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -1027,6 +1027,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 {



Reply via email to