Re: [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()

2016-01-09 Thread Cao jin
On 01/09/2016 06:50 AM, Eric Blake wrote: On 01/08/2016 01:37 AM, Cao jin wrote: buf[rc] = 0; rc = qemu_strtoul(buf, &endptr, base, &value); Do you still need a local 'value' variable, or can you just reuse pvalue here? I guess so, or else it won`t compile, because, *pval

Re: [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()

2016-01-09 Thread Cao jin
On 01/09/2016 06:50 AM, Eric Blake wrote: On 01/08/2016 01:37 AM, Cao jin wrote: To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 134 ++- hw/xen/xen-host-pci-device.h | 5 +- hw/xen/xen_pt.

Re: [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()

2016-01-08 Thread Eric Blake
On 01/08/2016 01:37 AM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > --- > hw/xen/xen-host-pci-device.c | 134 > ++- > hw/xen/xen-host-pci-device.h | 5 +- > hw/xen/xen_pt.c | 13 +++-- > 3 f

[Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()

2016-01-08 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 134 ++- hw/xen/xen-host-pci-device.h | 5 +- hw/xen/xen_pt.c | 13 +++-- 3 files changed, 81 insertions(+), 71 deletions(-) diff --gi