On Thu, Feb 25, 2010 at 11:23:52AM +0100, 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> > --- > 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;
Can we make the error message a bit more verbose? E.g. "scsi-disk does not support /dev/sg*, please use *** instead". Where *** tells user what to do. > + } > + > if (bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM) { > s->cluster_size = 4; > } else { > -- > 1.6.6 > >