Paolo Bonzini <pbonz...@redhat.com> writes: > Il 18/09/2014 15:06, arei.gong...@huawei.com ha scritto: >> we will lose the error message. Using error_report >> to report it. >> >> Cc: Markus Armbruster <arm...@redhat.com> >> Signed-off-by: Gonglei <arei.gong...@huawei.com> >> Reviewed-by: Markus Armbruster <arm...@redhat.com> >> Reviewed-by: Eric Blake <ebl...@redhat.com> >> --- >> v4: >> fix typo in the subject (Eric), Thanks. >> v3: >> fix some typos/grammar issues (Eric) and add 'R-by' tag >> v2: >> using original condition instead of local_err (Markus) >> --- >> hw/pci/pci-hotplug-old.c | 5 ++++- > > Hi Gonglei, since this is for an HMP-only command, please use > qerror_report_err like qemu_pci_hot_add_nic does. > > Sorry for not noticing this patch earlier.
error_report() is just fine here. qerror_report() is never necessary in HMP-only code. It makes a difference only in QMP context, and even there it should only be used in code that hasn't been converted to the Error API. For an example, see commit b1422f2. Eventually, qerror.h should just die. I've been chipping away at it when I have nothing better to do. Slow progress, better than no progress. Let's commit v4.