From: Luiz Capitulino <lcapitulino@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): Use error_set()
Date: Thu, 29 Mar 2012 10:15:46 -0300 [thread overview]
Message-ID: <20120329101546.71666aa7@doriath.home> (raw)
In-Reply-To: <20120329070015.GB13344@stefanha-thinkpad.localdomain>
On Thu, 29 Mar 2012 08:00:15 +0100
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Wed, Mar 28, 2012 at 05:50:53PM -0300, Luiz Capitulino wrote:
> > @@ -268,7 +270,14 @@ static int pci_device_hot_remove(Monitor *mon, const char *pci_addr)
> > monitor_printf(mon, "slot %d empty\n", slot);
> > return -1;
> > }
> > - return qdev_unplug(&d->qdev);
> > +
> > + ret = qdev_unplug(&d->qdev, &errp);
> > + if (error_is_set(&errp)) {
> > + monitor_printf(mon, "%s\n", error_get_pretty(errp));
> > + error_free(errp);
> > + }
>
> Minor thing if you respin: this if statement could be replaced with hmp_handle_error(mon, &errp).
I'm not sure I'd like to see hmp_handle_error() spread over the tree. It uses
the monitor object and I've added it just because having the same code
duplicated among HMP functions bothered me... I think it's better to
restrict it to hmp.c.
next prev parent reply other threads:[~2012-03-29 13:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 20:50 [Qemu-devel] [PATCH 0/2]: convert device_del to the qapi Luiz Capitulino
2012-03-28 20:50 ` [Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): Use error_set() Luiz Capitulino
2012-03-29 7:00 ` Stefan Hajnoczi
2012-03-29 13:15 ` Luiz Capitulino [this message]
2012-03-29 13:45 ` Stefan Hajnoczi
2012-03-28 20:50 ` [Qemu-devel] [PATCH 2/2] qapi: convert device_del Luiz Capitulino
2012-03-29 7:08 ` Stefan Hajnoczi
2012-03-29 13:17 ` Luiz Capitulino
2012-03-29 13:39 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2012-03-29 16:56 [Qemu-devel] [PATCH v2 0/2]: convert device_del to the qapi Luiz Capitulino
2012-03-29 16:56 ` [Qemu-devel] [PATCH 1/2] qdev: qdev_unplug(): use error_set() Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120329101546.71666aa7@doriath.home \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).