From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtJOw-0005bY-8r for qemu-devel@nongnu.org; Wed, 18 Dec 2013 10:51:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtJOq-0004AM-Uu for qemu-devel@nongnu.org; Wed, 18 Dec 2013 10:51:10 -0500 Message-ID: <52B1C463.5060301@suse.de> Date: Wed, 18 Dec 2013 16:50:59 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1385654544-1774-1-git-send-email-armbru@redhat.com> <877gb2gqgh.fsf@blackfin.pond.sub.org> In-Reply-To: <877gb2gqgh.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] qdev-monitor: device_add crashes on non-device driver name, fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, aliguori@amazon.com Am 18.12.2013 15:54, schrieb Markus Armbruster: > Ping? Already queued on qom-next: https://github.com/afaerber/qemu-cpu/commits/qom-next Sorry, did the patch processing offline on a train. ;) Thanks, Andreas > armbru@redhat.com writes: >=20 >> From: Markus Armbruster >> >> Watch this: >> >> $ upstream-qemu -nodefaults -S -display none -monitor stdio >> QEMU 1.7.50 monitor - type 'help' for more information >> (qemu) device_add rng-egd >> /work/armbru/qemu/qdev-monitor.c:491:qdev_device_add: Object 0x208= 9b00 is not an instance of type device >> Aborted (core dumped) >> >> Crashes because "rng-egd" exists, but isn't a subtype of TYPE_DEVICE. >> Broken in commit 18b6dad. >> >> Cc: qemu-stable@nongnu.org >> Signed-off-by: Markus Armbruster >> --- >> qdev-monitor.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/qdev-monitor.c b/qdev-monitor.c >> index dc37a43..90a0cea 100644 >> --- a/qdev-monitor.c >> +++ b/qdev-monitor.c >> @@ -477,7 +477,7 @@ DeviceState *qdev_device_add(QemuOpts *opts) >> } >> } >> =20 >> - if (!oc) { >> + if (!object_class_dynamic_cast(oc, TYPE_DEVICE)) { >> qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "device= type"); >> return NULL; >> } >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg