
On 12/16/2010 11:56 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 command line code into its own file
Same nit about sharing this common function with capabilities code.
ACK.
Also squash this in: diff --git i/po/POTFILES.in w/po/POTFILES.in index c2979bd..f71ce2a 100644 --- i/po/POTFILES.in +++ w/po/POTFILES.in @@ -52,6 +52,7 @@ src/openvz/openvz_driver.c src/phyp/phyp_driver.c src/qemu/qemu_bridge_filter.c src/qemu/qemu_capabilities.c +src/qemu/qemu_command.c src/qemu/qemu_conf.c src/qemu/qemu_driver.c src/qemu/qemu_monitor.c diff --git i/src/qemu/qemu_command.h w/src/qemu/qemu_command.h index da35d3b..7e82ef3 100644 --- i/src/qemu/qemu_command.h +++ w/src/qemu/qemu_command.h @@ -24,10 +24,10 @@ #ifndef __QEMU_COMMAND_H__ # define __QEMU_COMMAND_H__ -#include "domain_conf.h" -#include "command.h" -#include "capabilities.h" -#include "qemu_conf.h" +# include "domain_conf.h" +# include "command.h" +# include "capabilities.h" +# include "qemu_conf.h" /* Config type for XML import/export conversions */ # define QEMU_CONFIG_FORMAT_ARGV "qemu-argv" diff --git i/src/qemu/qemu_conf.c w/src/qemu/qemu_conf.c index e600a5b..9869b40 100644 --- i/src/qemu/qemu_conf.c +++ w/src/qemu/qemu_conf.c @@ -37,7 +37,6 @@ #include <sys/utsname.h> #include <mntent.h> -#include "c-ctype.h" #include "virterror_internal.h" #include "qemu_conf.h" #include "qemu_capabilities.h" @@ -413,5 +412,3 @@ int qemudLoadDriverConfig(struct qemud_driver *driver, virConfFree (conf); return 0; } - - diff --git i/tests/qemuargv2xmltest.c w/tests/qemuargv2xmltest.c index adff05a..dfb9d99 100644 --- i/tests/qemuargv2xmltest.c +++ w/tests/qemuargv2xmltest.c @@ -14,6 +14,7 @@ # include "internal.h" # include "testutils.h" # include "qemu/qemu_conf.h" +# include "qemu/qemu_command.h" # include "testutilsqemu.h" diff --git i/tests/qemuxml2argvtest.c w/tests/qemuxml2argvtest.c index f1cdc30..554da2f 100644 --- i/tests/qemuxml2argvtest.c +++ w/tests/qemuxml2argvtest.c @@ -15,6 +15,7 @@ # include "testutils.h" # include "qemu/qemu_conf.h" # include "qemu/qemu_capabilities.h" +# include "qemu/qemu_command.h" # include "datatypes.h" # include "cpu/cpu_map.h" @@ -111,9 +112,9 @@ static int testCompareXMLToArgvFiles(const char *xml, free(virtTestLogContentAndReset()); virResetLastError(); - if (!(cmd = qemudBuildCommandLine(conn, &driver, - vmdef, &monitor_chr, false, flags, - migrateFrom, NULL, VIR_VM_OP_CREATE))) + if (!(cmd = qemuBuildCommandLine(conn, &driver, + vmdef, &monitor_chr, false, flags, + migrateFrom, NULL, VIR_VM_OP_CREATE))) goto fail; if (!!virGetLastError() != expectError) { -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org