* [Qemu-devel] [PATCH 0/2] qdev: two little fixes.
@ 2009-07-09 13:02 Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 1/2] qdev: catch unknown devices in -device Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 2/2] qdev: fix nic/id windup Gerd Hoffmann
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2009-07-09 13:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
This just brings two little bugfixes as incremental patches for the qdev
patch series posted last friday, found them while coding / testing more
qdev stuff.
If prefered I can also fold them in and repost the whole series.
cheers,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/2] qdev: catch unknown devices in -device
2009-07-09 13:02 [Qemu-devel] [PATCH 0/2] qdev: two little fixes Gerd Hoffmann
@ 2009-07-09 13:02 ` Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 2/2] qdev: fix nic/id windup Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2009-07-09 13:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] qdev: fix nic/id windup.
2009-07-09 13:02 [Qemu-devel] [PATCH 0/2] qdev: two little fixes Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 1/2] qdev: catch unknown devices in -device Gerd Hoffmann
@ 2009-07-09 13:02 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2009-07-09 13:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/pci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 3410ea7..cc4882e 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -821,7 +821,8 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
for (i = 0; pci_nic_models[i]; i++) {
if (strcmp(nd->model, pci_nic_models[i]) == 0) {
dev = pci_create(pci_nic_names[i], devaddr);
- snprintf(dev->id, sizeof(dev->id), "%s", nd->id);
+ if (nd->id)
+ snprintf(dev->id, sizeof(dev->id), "%s", nd->id);
dev->nd = nd;
qdev_init(dev);
nd->private = dev;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-09 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 13:02 [Qemu-devel] [PATCH 0/2] qdev: two little fixes Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 1/2] qdev: catch unknown devices in -device Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 2/2] qdev: fix nic/id windup Gerd Hoffmann
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).