From: Christian Borntraeger <borntraeger@de.ibm.com>
To: aliguori@us.ibm.com, pbonzini@redhat.com
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
agraf@suse.de, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix legacy device aliases for s390
Date: Thu, 3 May 2012 10:47:16 +0200 [thread overview]
Message-ID: <1336034836-17892-1-git-send-email-borntraeger@de.ibm.com> (raw)
When qemu is called with -device virtio-serial/blk/net on s390, this alias
is translated to virtio-serial/blk/net-pci instead of s390, since these
drivers are first in the alias table.
Let the core code check if the driver exist, if not lets search further.
This fixes errors like:
qemu-kvm: -device virtio-serial,id=virtio-serial0: Parameter 'driver'
expects device type
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
hw/qdev-monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index dc4e4e1..8d1b5ba 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -110,7 +110,8 @@ static const char *find_typename_by_alias(const char *alias)
int i;
for (i = 0; qdev_alias_table[i].alias; i++) {
- if (strcmp(qdev_alias_table[i].alias, alias) == 0) {
+ if (strcmp(qdev_alias_table[i].alias, alias) == 0 &&
+ object_class_by_name(qdev_alias_table[i].typename)) {
return qdev_alias_table[i].typename;
}
}
--
1.7.9.6
next reply other threads:[~2012-05-03 8:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 8:47 Christian Borntraeger [this message]
2012-05-03 8:49 ` [Qemu-devel] [PATCH] Fix legacy device aliases for s390 Alexander Graf
2012-05-03 8:53 ` Christian Borntraeger
2012-05-03 8:55 ` Alexander Graf
2012-05-03 9:03 ` Paolo Bonzini
2012-05-03 9:05 ` Paolo Bonzini
2012-05-03 9:07 ` Alexander Graf
2012-05-03 9:16 ` Paolo Bonzini
2012-05-03 12:32 ` Anthony Liguori
2012-05-03 13:34 ` Alexander Graf
2012-05-17 22:57 ` Alexander Graf
2012-05-18 0:28 ` Anthony Liguori
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=1336034836-17892-1-git-send-email-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@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).