[libvirt] [PATCH 01/10] Move QEMU capabilities management into a separate file

Eric Blake eblake at redhat.com
Fri Dec 17 00:12:40 UTC 2010


On 12/16/2010 05:09 PM, Eric Blake wrote:
> On 12/16/2010 11:05 AM, Eric Blake wrote:
>> On 12/16/2010 09:50 AM, Daniel P. Berrange wrote:
>>> The qemu_conf.c code is doing three jobs, driver config file
>>> loading, QEMU capabilities management and QEMU command line
>>> management. Move the capabilities code into its own file
>>>
>>> * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: New
>>>   capabilities management code
>>> * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete capabilities
>>>   code
>>> * src/qemu/qemu_conf.h: Adapt for API renames
>>> * src/Makefile.am: add src/qemu/qemu_capabilities.c
>>> ---
>>>  src/Makefile.am              |    1 +
>>>  src/qemu/qemu_capabilities.c | 1253 ++++++++++++++++++++++++++++++++++++++++++
>>>  src/qemu/qemu_capabilities.h |  113 ++++
>>>  src/qemu/qemu_conf.c         | 1191 +---------------------------------------
>>>  src/qemu/qemu_conf.h         |   81 ---
>>>  src/qemu/qemu_driver.c       |   55 +-
> 
>> Other than that nit, ACK - this appeared to be straight code motion plus
>> fallout from renaming to a consistent API
> 
> Actually, you need to run 'make syntax-check' (missing a change to
> po/POTIFILES.in) and 'make check' (qemuxml2argvtest.c fails to compile,
> because it isn't including the new qemu_capabilities.h).

diff --git i/po/POTFILES.in w/po/POTFILES.in
index e7be0d3..c2979bd 100644
--- i/po/POTFILES.in
+++ w/po/POTFILES.in
@@ -51,6 +51,7 @@ src/openvz/openvz_conf.c
 src/openvz/openvz_driver.c
 src/phyp/phyp_driver.c
 src/qemu/qemu_bridge_filter.c
+src/qemu/qemu_capabilities.c
 src/qemu/qemu_conf.c
 src/qemu/qemu_driver.c
 src/qemu/qemu_monitor.c
diff --git i/tests/qemuhelptest.c w/tests/qemuhelptest.c
index 6ff1feb..3f82692 100644
--- i/tests/qemuhelptest.c
+++ w/tests/qemuhelptest.c
@@ -7,6 +7,7 @@

 # include "testutils.h"
 # include "qemu/qemu_conf.h"
+# include "qemu/qemu_capabilities.h"

 # define MAX_HELP_OUTPUT_SIZE 1024*64

@@ -50,8 +51,8 @@ static int testHelpStrParsing(const void *data)
     if (virtTestLoadFile(path, &help, MAX_HELP_OUTPUT_SIZE) < 0)
         return -1;

-    if (qemudParseHelpStr("QEMU", help, &flags,
-                          &version, &is_kvm, &kvm_version) == -1)
+    if (qemuCapsParseHelpStr("QEMU", help, &flags,
+                             &version, &is_kvm, &kvm_version) == -1)
         return -1;

     if (flags != info->flags) {
diff --git i/tests/qemuxml2argvtest.c w/tests/qemuxml2argvtest.c
index 5387432..f1cdc30 100644
--- i/tests/qemuxml2argvtest.c
+++ w/tests/qemuxml2argvtest.c
@@ -14,6 +14,7 @@
 # include "internal.h"
 # include "testutils.h"
 # include "qemu/qemu_conf.h"
+# include "qemu/qemu_capabilities.h"
 # include "datatypes.h"
 # include "cpu/cpu_map.h"

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101216/2461d0b1/attachment-0001.sig>


More information about the libvir-list mailing list