From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
afaerber@suse.de, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 2/2] scsi-bus: Convert DeviceClass init to realize
Date: Tue, 12 Aug 2014 10:31:04 +0100 [thread overview]
Message-ID: <20140812093104.GF20490@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1407809575-24576-3-git-send-email-famz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]
On Tue, Aug 12, 2014 at 10:12:55AM +0800, Fam Zheng wrote:
> Replace "init/destroy" with "realize/unrealize" in SCSIDeviceClass,
> which has errp as a parameter. So all the implementations now use
> error_setg instead of error_report for reporting error.
>
> Also in scsi_bus_legacy_handle_cmdline, report the error when
> initializing the if=scsi devices, before returning it, because in the
> callee, error_report is changed to error_setg. And the callers don't
> have the right locations (e.g. "-drive if=scsi").
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> hw/scsi/lsi53c895a.c | 1 +
> hw/scsi/scsi-bus.c | 70 ++++++++++++++++++++---------------------
> hw/scsi/scsi-disk.c | 78 ++++++++++++++++++++++++----------------------
> hw/scsi/scsi-generic.c | 37 +++++++++++-----------
> include/hw/scsi/scsi.h | 7 +++--
> tests/qemu-iotests/051.out | 2 --
> 6 files changed, 98 insertions(+), 97 deletions(-)
If other places in QEMU have the same problem we might want to add
an error_prepend() function instead. But this is fine for now:
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-08-12 9:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 2:12 [Qemu-devel] [PATCH v4 0/2] scsi: Change device init to realize Fam Zheng
2014-08-12 2:12 ` [Qemu-devel] [PATCH v4 1/2] block: Pass errp in blkconf_geometry Fam Zheng
2014-08-12 2:12 ` [Qemu-devel] [PATCH v4 2/2] scsi-bus: Convert DeviceClass init to realize Fam Zheng
2014-08-12 9:31 ` Stefan Hajnoczi [this message]
2014-08-18 15:41 ` [Qemu-devel] [PATCH v4 0/2] scsi: Change device " Paolo Bonzini
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=20140812093104.GF20490@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@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).