virutil: Move string related functions to virstring.c

The source code base needs to be adapted as well. Some files
include virutil.h just for the string related functions (here,
the include is substituted to match the new file), some include
virutil.h without any need (here, the include is removed), and
some require both.
This commit is contained in:
Michal Privoznik
2013-04-03 12:36:23 +02:00
parent 297c99a567
commit 7c9a2d88cd
242 changed files with 590 additions and 557 deletions

View File

@@ -31,13 +31,13 @@
#include "testutils.h"
#include "internal.h"
#include "nodeinfo.h"
#include "virutil.h"
#include "viralloc.h"
#include "vircommand.h"
#include "virfile.h"
#include "virpidfile.h"
#include "virerror.h"
#include "virthread.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@@ -38,6 +38,7 @@
#include "cpu_conf.h"
#include "cpu/cpu.h"
#include "cpu/cpu_map.h"
#include "virstring.h"
static const char *abs_top_srcdir;

View File

@@ -16,6 +16,7 @@
# include "qemu/qemu_conf.h"
# include "qemu/qemu_domain.h"
# include "testutilsqemu.h"
# include "virstring.h"
static virQEMUDriver driver;

View File

@@ -10,7 +10,6 @@
# include "internal.h"
# include "viralloc.h"
# include "virutil.h"
# include "vmx/vmx.h"
# include "esx/esx_util.h"
# include "esx/esx_vi_types.h"

View File

@@ -12,7 +12,7 @@
#include "testutils.h"
#include "interface_conf.h"
#include "testutilsqemu.h"
#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *xml)

View File

@@ -29,6 +29,7 @@
#include "virerror.h"
#include "virlog.h"
#include "virconf.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@@ -15,6 +15,7 @@
# include "internal.h"
# include "lxc/lxc_conf.h"
# include "testutilslxc.h"
# include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;

View File

@@ -14,6 +14,7 @@
#include "vircommand.h"
#include "viralloc.h"
#include "network/bridge_driver.h"
#include "virstring.h"
static int
testCompareXMLToConfFiles(const char *inxml, const char *outconf, dnsmasqCapsPtr caps)

View File

@@ -12,6 +12,7 @@
#include "testutils.h"
#include "network_conf.h"
#include "testutilsqemu.h"
#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml,

View File

@@ -12,6 +12,7 @@
#include "testutils.h"
#include "node_device_conf.h"
#include "testutilsqemu.h"
#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *xml)

View File

@@ -8,8 +8,8 @@
#include "testutils.h"
#include "internal.h"
#include "nodeinfo.h"
#include "virutil.h"
#include "virfile.h"
#include "virstring.h"
#if ! (defined __linux__ && (defined(__x86_64__) || \
defined(__amd64__) || \

View File

@@ -15,6 +15,7 @@
#include "nwfilter_params.h"
#include "nwfilter_conf.h"
#include "testutilsqemu.h"
#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml,

View File

@@ -10,8 +10,8 @@
# include "internal.h"
# include "viralloc.h"
# include "virutil.h"
# include "openvz/openvz_conf.h"
# include "virstring.h"
static int
testLocateConfFile(int vpsid ATTRIBUTE_UNUSED, char **conffile,

View File

@@ -14,8 +14,8 @@
# include "internal.h"
# include "qemu/qemu_command.h"
# include "testutilsqemu.h"
# include "virstring.h"
static virQEMUDriver driver;

View File

@@ -9,6 +9,7 @@
# include "qemu/qemu_capabilities.h"
# include "viralloc.h"
# include "virstring.h"
struct testInfo {
const char *name;

View File

@@ -11,7 +11,6 @@
# include "internal.h"
# include "viralloc.h"
# include "virutil.h"
# include "qemu/qemu_monitor.h"
struct testEscapeString

View File

@@ -30,9 +30,9 @@
#include "qemu/qemu_monitor.h"
#include "rpc/virnetsocket.h"
#include "viralloc.h"
#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@@ -19,6 +19,7 @@
# include "qemu/qemu_domain.h"
# include "datatypes.h"
# include "cpu/cpu_map.h"
# include "virstring.h"
# include "testutilsqemu.h"

View File

@@ -16,6 +16,7 @@
# include "qemu/qemu_conf.h"
# include "qemu/qemu_domain.h"
# include "testutilsqemu.h"
# include "virstring.h"
static virQEMUDriver driver;

View File

@@ -18,8 +18,8 @@
# include "qemu/qemu_domain.h"
# include "datatypes.h"
# include "cpu/cpu_map.h"
# include "testutilsqemu.h"
# include "virstring.h"
static const char *abs_top_srcdir;
static virQEMUDriver driver;

View File

@@ -37,9 +37,8 @@
#include "virerror.h"
#include "virfile.h"
#include "virlog.h"
#include "virutil.h"
#include "security/security_manager.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@@ -31,11 +31,10 @@
#include "internal.h"
#include "testutils.h"
#include "viralloc.h"
#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
#include "security/security_manager.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@@ -12,6 +12,7 @@
#include "xenxs/xen_sxpr.h"
#include "testutils.h"
#include "testutilsxen.h"
#include "virstring.h"
static virCapsPtr caps;

View File

@@ -12,6 +12,7 @@
#include "testutils.h"
#include "storage_conf.h"
#include "testutilsqemu.h"
#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml)

View File

@@ -5,6 +5,7 @@
#include "datatypes.h"
#include "storage/storage_backend.h"
#include "testutilsqemu.h"
#include "virstring.h"
const char create_tool[] = "qemu-img";

View File

@@ -12,6 +12,7 @@
#include "testutils.h"
#include "storage_conf.h"
#include "testutilsqemu.h"
#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *poolxml, const char *inxml,

View File

@@ -33,8 +33,8 @@
#include "virbuffer.h"
#include "virsysinfo.h"
#include "testutils.h"
#include "virutil.h"
#include "virfile.h"
#include "virstring.h"
#if defined (__linux__)

View File

@@ -45,6 +45,7 @@
#include "virrandom.h"
#include "dirname.h"
#include "virprocess.h"
#include "virstring.h"
#if TEST_OOM_TRACE
# include <execinfo.h>

View File

@@ -24,7 +24,6 @@
#include <signal.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -5,10 +5,10 @@
#include <string.h>
#include "internal.h"
#include "virutil.h"
#include "testutils.h"
#include "virbuffer.h"
#include "viralloc.h"
#include "virstring.h"
#define TEST_ERROR(...) \
do { \

View File

@@ -28,7 +28,7 @@
# define __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__
# include "vircgrouppriv.h"
# include "virutil.h"
# include "virstring.h"
# include "virerror.h"
# include "virlog.h"
# include "virfile.h"

View File

@@ -21,7 +21,6 @@
#include <config.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -10,9 +10,8 @@
#include "virhashdata.h"
#include "testutils.h"
#include "viralloc.h"
#include "virutil.h"
#include "virlog.h"
#include "virstring.h"
#define testError(...) \
do { \

View File

@@ -25,7 +25,6 @@
#include "testutils.h"
#include "viridentity.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -24,7 +24,6 @@
#include <signal.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -24,7 +24,6 @@
#include <signal.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -33,6 +33,7 @@
#include "viralloc.h"
#include "virlog.h"
#include "virfile.h"
#include "virstring.h"
#include "rpc/virnetsocket.h"

View File

@@ -54,8 +54,8 @@ int bind(int sockfd ATTRIBUTE_UNUSED,
# include "virerror.h"
# include "viralloc.h"
# include "virlog.h"
# include "virportallocator.h"
# include "virstring.h"
# define VIR_FROM_THIS VIR_FROM_RPC

View File

@@ -6,8 +6,8 @@
#include "internal.h"
#include "virxml.h"
#include "virutil.h"
#include "testutils.h"
#include "virstring.h"
#ifdef WIN32

View File

@@ -27,6 +27,7 @@
#include "virerror.h"
#include "virlog.h"
#include "virstoragefile.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE

View File

@@ -23,7 +23,6 @@
#include <stdlib.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -24,7 +24,6 @@
#include <signal.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -24,7 +24,6 @@
#include <signal.h>
#include "testutils.h"
#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"

View File

@@ -11,6 +11,7 @@
# include "internal.h"
# include "viralloc.h"
# include "vmx/vmx.h"
# include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;

View File

@@ -10,6 +10,7 @@
#include "testutils.h"
#include "xen/xen_hypervisor.h"
#include "virfile.h"
#include "virstring.h"
static int
testCompareFiles(virArch hostmachine, const char *xml_rel,

View File

@@ -35,6 +35,7 @@
#include "testutils.h"
#include "testutilsxen.h"
#include "viralloc.h"
#include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;

View File

@@ -14,6 +14,7 @@
#include "xenxs/xen_sxpr.h"
#include "testutils.h"
#include "testutilsxen.h"
#include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;

View File

@@ -11,6 +11,7 @@
# include "internal.h"
# include "viralloc.h"
# include "vmx/vmx.h"
# include "virstring.h"
static virCapsPtr caps;
static virVMXContext ctx;