From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] Re: [PATCH] scsi: Make device scsi-disk reject /dev/sg*
Date: Thu, 25 Feb 2010 13:47:03 +0200 [thread overview]
Message-ID: <20100225114703.GD9116@redhat.com> (raw)
In-Reply-To: <m3iq9lvcjr.fsf@blackfin.pond.sub.org>
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 <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;
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
>
>
next prev parent reply other threads:[~2010-02-25 11:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-03-09 15:01 ` [Qemu-devel] " Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100225114703.GD9116@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).