
On 02/27/2013 09:56 AM, Eric Blake wrote:
@@ -944,6 +945,8 @@ virQEMUCapsComputeCmdFlags(const char *help, } if (strstr(help, "-uuid")) virQEMUCapsSet(qemuCaps, QEMU_CAPS_UUID); + if (strstr(help, "-dtb")) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_DTB);
This won't work. -dtb did not exist prior to qemu 1.2, and for all qemu newer than 1.2, we do NOT scrape '-help' output; instead, we use QMP query commands. You need to figure out the corresponding QMP command that we can use to tell when dtb support exists in qemu.
I stand (slightly) corrected: it looks like -dtb was added in qemu 1.1 (qemu commit 379b5c7), which means we DO need -help scraping for that version of qemu. Then, since it predates when QMP queries are reliable, you can get away with blindly setting QEMU_CAPS_DTB when targetting a qemu new enough to support QMP queries without actually having to query for it. But it's still something to be fixed before this patch is ready :) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org