From: Luiz Capitulino <lcapitulino@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>,
Paolo Bonzini <pbonzini@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] qdev: fix crash when device_add is called with abstract driver
Date: Tue, 17 Sep 2013 14:22:25 -0400 [thread overview]
Message-ID: <20130917142225.6f608216@redhat.com> (raw)
In-Reply-To: <52389470.8060505@suse.de>
On Tue, 17 Sep 2013 19:42:08 +0200
Andreas Färber <afaerber@suse.de> wrote:
> > diff --git a/qdev-monitor.c b/qdev-monitor.c
> > index 410cdcb..bb2e1b6 100644
> > --- a/qdev-monitor.c
> > +++ b/qdev-monitor.c
> > @@ -472,6 +472,12 @@ DeviceState *qdev_device_add(QemuOpts *opts)
> > return NULL;
> > }
> >
> > + if (object_class_is_abstract(obj)) {
> > + qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver",
> > + "non-abstract device type");
>
> Is qerror_report() still okay despite the QERR_* considered obsolete for
> error_set()? I.e. because this is only printing the text and not passing
> on error classes?
This is OK because qdev_device_add() still uses qerror_report(). This is
so because do_device_add() (the QMP/HMP command in question) hasn't been
converted yet.
> Or where do we draw the line? (CC Luiz)
We should convert old qerror_report() users to error_set() whenever
doing error-related changes. But sometimes it may not be practical to do
it right away (this case).
prev parent reply other threads:[~2013-09-17 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 13:32 [Qemu-devel] [PATCH] qdev: fix crash when device_add is called with abstract driver Igor Mammedov
2013-09-17 14:27 ` Paolo Bonzini
2013-09-17 17:42 ` Andreas Färber
2013-09-17 18:22 ` Luiz Capitulino [this message]
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=20130917142225.6f608216@redhat.com \
--to=lcapitulino@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
--cc=xiawenc@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.