From: Amos Kong <akong@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, aliguori@us.ibm.com, kevin@koconnor.net,
seabios@seabios.org
Subject: [Qemu-devel] [PATCH] qdev: don't add typename to fw_dev_path when get_fw_dev_path isn't implemented
Date: Tue, 28 May 2013 18:25:34 +0800 [thread overview]
Message-ID: <1369736734-15449-1-git-send-email-akong@redhat.com> (raw)
Currently we add typename to fw_dev_path if virtio-bus
doesn't have get_fw_dev_path implementation, the fw_dev_path
passed to seabios is not expected, the typename is redundant.
It causes that bootindex parameter of scsi device doesn't work.
This patch changes the qdev_get_fw_dev_path_helper() to add
nothing if device doesn't have get_fw_dev_path implementation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
---
hw/core/qdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 6985ad8..150255d 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -515,7 +515,7 @@ static int qdev_get_fw_dev_path_helper(DeviceState *dev, char *p, int size)
l += snprintf(p + l, size - l, "%s", d);
g_free(d);
} else {
- l += snprintf(p + l, size - l, "%s", object_get_typename(OBJECT(dev)));
+ return l;
}
}
l += snprintf(p + l , size - l, "/");
--
1.8.1.4
next reply other threads:[~2013-05-28 10:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 10:25 Amos Kong [this message]
2013-05-28 10:30 ` [Qemu-devel] [PATCH] qdev: don't add typename to fw_dev_path when get_fw_dev_path isn't implemented Paolo Bonzini
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=1369736734-15449-1-git-send-email-akong@redhat.com \
--to=akong@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=kevin@koconnor.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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).