From: Igor Mammedov <imammedo@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, "Don Slutz" <dslutz@verizon.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] qdev: Don't abort() in case globals can't be set
Date: Mon, 9 Jun 2014 15:00:53 +0200 [thread overview]
Message-ID: <20140609150053.7c51b119@thinkpad> (raw)
In-Reply-To: <20140607012615.GL15000@otherpad.lan.raisama.net>
On Fri, 6 Jun 2014 22:26:15 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:
> It would be much better if we didn't terminate QEMU inside
> device_post_init(), but at least exiting cleanly is better than aborting
> and dumping core.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> hw/core/qdev.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index e65a5aa..74862c2 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -901,7 +901,13 @@ static void device_initfn(Object *obj)
>
> static void device_post_init(Object *obj)
> {
> - qdev_prop_set_globals(DEVICE(obj), &error_abort);
> + Error *err = NULL;
> + qdev_prop_set_globals(DEVICE(obj), &err);
> + if (err) {
> + qerror_report_err(err);
> + error_free(err);
> + exit(EXIT_FAILURE);
> + }
> }
>
> /* Unlink device from bus and free the structure. */
> --
> 1.9.0
>
>
Reviewed-By: Igor Mammedov <imammedo@redhat.com>
--
Regards,
Igor
next prev parent reply other threads:[~2014-06-09 13:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 20:14 [Qemu-devel] [PATCH] qdev: Skip non-existing properties when setting globals Eduardo Habkost
2014-06-06 21:06 ` Don Slutz
2014-06-06 21:38 ` Igor Mammedov
2014-06-06 22:21 ` Eduardo Habkost
2014-06-06 23:22 ` Igor Mammedov
2014-06-06 23:45 ` Peter Maydell
2014-06-07 1:09 ` Eduardo Habkost
2014-06-07 1:26 ` [Qemu-devel] [PATCH] qdev: Don't abort() in case globals can't be set Eduardo Habkost
2014-06-08 10:48 ` Michael S. Tsirkin
2014-06-09 13:00 ` Igor Mammedov [this message]
2014-06-07 8:55 ` [Qemu-devel] [PATCH] qdev: Skip non-existing properties when setting globals Peter Maydell
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=20140609150053.7c51b119@thinkpad \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=dslutz@verizon.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).