[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 1/5] serial-pci: Avoid qerror_report_err() o
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH RFC 1/5] serial-pci: Avoid qerror_report_err() outside QMP command handlers |
Date: |
Mon, 02 Mar 2015 11:02:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
zhanghailiang <address@hidden> writes:
> qerror_report_err() is a transitional interface to help with
> converting existing monitor commands to QMP. It should not be used
> elsewhere. Replace by error_report_err() in serial_pci_init() and
> multi_serial_pci_init().
>
> Signed-off-by: zhanghailiang <address@hidden>
> ---
> hw/char/serial-pci.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
> index f05c9b4..2b0bf54 100644
> --- a/hw/char/serial-pci.c
> +++ b/hw/char/serial-pci.c
> @@ -27,7 +27,6 @@
>
> #include "hw/char/serial.h"
> #include "hw/pci/pci.h"
> -#include "qapi/qmp/qerror.h"
>
> #define PCI_SERIAL_MAX_PORTS 4
>
> @@ -57,8 +56,7 @@ static int serial_pci_init(PCIDevice *dev)
> s->baudbase = 115200;
> serial_realize_core(s, &err);
> if (err != NULL) {
> - qerror_report_err(err);
> - error_free(err);
> + error_report_err(err);
> return -1;
> }
>
> @@ -116,8 +114,7 @@ static int multi_serial_pci_init(PCIDevice *dev)
> s->baudbase = 115200;
> serial_realize_core(s, &err);
> if (err != NULL) {
> - qerror_report_err(err);
> - error_free(err);
> + error_report_err(err);
> return -1;
> }
> s->irq = pci->irqs[i];
This breaks the error reply when you hot plug the devices via QMP
device_add.
The correct solution is my "[PATCH 06/10] serial-pci: Convert to
realize".
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH RFC 1/5] serial-pci: Avoid qerror_report_err() outside QMP command handlers,
Markus Armbruster <=