From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] qdev: catch unknown devices in -device
Date: Thu, 9 Jul 2009 15:02:08 +0200 [thread overview]
Message-ID: <1247144529-8805-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1247144529-8805-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/qdev.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index 979ed4f..009e68d 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -133,6 +133,11 @@ DeviceState *qdev_device_add(const char *cmdline)
}
info = qdev_find_info(NULL, driver);
+ if (!info) {
+ fprintf(stderr, "Device \"%s\" not found. Try -device '?' for a list.\n",
+ driver);
+ return NULL;
+ }
if (!info->bus_info->add) {
fprintf(stderr, "bus \"%s\" can't add devices.\n",
info->bus_info->name);
--
1.6.2.5
next prev parent reply other threads:[~2009-07-09 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 13:02 [Qemu-devel] [PATCH 0/2] qdev: two little fixes Gerd Hoffmann
2009-07-09 13:02 ` Gerd Hoffmann [this message]
2009-07-09 13:02 ` [Qemu-devel] [PATCH 2/2] qdev: fix nic/id windup Gerd Hoffmann
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=1247144529-8805-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--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).