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 <[email protected]>
> ---
>  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 <[email protected]>

Attachment: pgpOOXipGYTo4.pgp
Description: PGP signature

Reply via email to