From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] qdev: fix nic/id windup.
Date: Thu, 9 Jul 2009 15:02:09 +0200 [thread overview]
Message-ID: <1247144529-8805-3-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/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
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 ` [Qemu-devel] [PATCH 1/2] qdev: catch unknown devices in -device Gerd Hoffmann
2009-07-09 13:02 ` Gerd Hoffmann [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=1247144529-8805-3-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).