qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 2/2] scsi-bus: Convert DeviceClass init to re


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 2/2] scsi-bus: Convert DeviceClass init to realize
Date: Tue, 12 Aug 2014 10:31:04 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>
> ---
>  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 <address@hidden>

Attachment: pgpxDKxXqfkCJ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]