On 02/03/2011 07:13 AM, Jiri Denemark wrote:
---
src/qemu/qemu_capabilities.c | 5 ++++-
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 17 +++++++++++++++++
3 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 37a97aa..fd46557 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1088,8 +1088,11 @@ qemuCapsParseDeviceStr(const char *str, unsigned long long
*flags)
/* Features of given devices. */
if (strstr(str, "pci-assign.configfd"))
*flags |= QEMUD_CMD_FLAG_PCI_CONFIGFD;
- if (strstr(str, "virtio-blk-pci.bootindex"))
+ if (strstr(str, "virtio-blk-pci.bootindex")) {
*flags |= QEMUD_CMD_FLAG_BOOTINDEX;
+ if (strstr(str, "pci-assign.bootindex"))
+ *flags |= QEMUD_CMD_FLAG_PCI_BOOTINDEX;
+ }
Nice that you avoid the strstr() if you can't even use per-device boot
ordering, and also nice that qemu lets us query both pci-assign and
virtio-blk-pci in one invocation.
+++ b/src/qemu/qemu_capabilities.h
@@ -87,6 +87,7 @@ enum qemuCapsFlags {
QEMUD_CMD_FLAG_HDA_DUPLEX = (1LL << 50), /* -device hda-duplex */
QEMUD_CMD_FLAG_DRIVE_AIO = (1LL << 51), /* -drive aio= supported */
QEMUD_CMD_FLAG_PCI_MULTIBUS = (1LL << 52), /* bus=pci.0 vs bus=pci */
+ QEMUD_CMD_FLAG_PCI_BOOTINDEX = (1LL << 53), /* pci-assign.bootindex */
Boy, this file has been hot lately! (note to self, I get to rebase this
line for smartcard yet again).
ACK.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org