qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] scsi: Make device scsi-disk reject /dev/sg*
@ 2010-02-25 10:23 Markus Armbruster
  2010-02-25 11:19 ` [Qemu-devel] " Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Markus Armbruster @ 2010-02-25 10:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

You're supposed to use scsi-generic for that.  Which rejects anything
but /dev/sg*.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 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 {
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-09 15:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 10:23 [Qemu-devel] [PATCH] scsi: Make device scsi-disk reject /dev/sg* Markus Armbruster
2010-02-25 11:19 ` [Qemu-devel] " Gerd Hoffmann
2010-02-25 11:58   ` Markus Armbruster
2010-02-28  1:45   ` Paul Brook
2010-03-01  8:13     ` Gerd Hoffmann
2010-02-25 11:47 ` Michael S. Tsirkin
2010-03-09 15:01 ` [Qemu-devel] " Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).