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

2014-08-12 Thread Stefan Hajnoczi
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

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

2014-08-11 Thread Fam Zheng
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