mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# include "qemu/qemu_conf.h"
|
||||
# include "qemu/qemu_domain.h"
|
||||
# include "testutilsqemu.h"
|
||||
# include "virstring.h"
|
||||
|
||||
static virQEMUDriver driver;
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "testutils.h"
|
||||
#include "interface_conf.h"
|
||||
#include "testutilsqemu.h"
|
||||
|
||||
#include "virstring.h"
|
||||
|
||||
static int
|
||||
testCompareXMLToXMLFiles(const char *xml)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "virerror.h"
|
||||
#include "virlog.h"
|
||||
#include "virconf.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
# include "internal.h"
|
||||
# include "lxc/lxc_conf.h"
|
||||
# include "testutilslxc.h"
|
||||
# include "virstring.h"
|
||||
|
||||
static virCapsPtr caps;
|
||||
static virDomainXMLOptionPtr xmlopt;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "testutils.h"
|
||||
#include "node_device_conf.h"
|
||||
#include "testutilsqemu.h"
|
||||
#include "virstring.h"
|
||||
|
||||
static int
|
||||
testCompareXMLToXMLFiles(const char *xml)
|
||||
|
||||
@@ -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__) || \
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
# include "internal.h"
|
||||
# include "qemu/qemu_command.h"
|
||||
|
||||
# include "testutilsqemu.h"
|
||||
# include "virstring.h"
|
||||
|
||||
static virQEMUDriver driver;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
# include "qemu/qemu_capabilities.h"
|
||||
# include "viralloc.h"
|
||||
# include "virstring.h"
|
||||
|
||||
struct testInfo {
|
||||
const char *name;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
# include "internal.h"
|
||||
# include "viralloc.h"
|
||||
# include "virutil.h"
|
||||
# include "qemu/qemu_monitor.h"
|
||||
|
||||
struct testEscapeString
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
# include "qemu/qemu_domain.h"
|
||||
# include "datatypes.h"
|
||||
# include "cpu/cpu_map.h"
|
||||
# include "virstring.h"
|
||||
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# include "qemu/qemu_conf.h"
|
||||
# include "qemu/qemu_domain.h"
|
||||
# include "testutilsqemu.h"
|
||||
# include "virstring.h"
|
||||
|
||||
static virQEMUDriver driver;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "xenxs/xen_sxpr.h"
|
||||
#include "testutils.h"
|
||||
#include "testutilsxen.h"
|
||||
#include "virstring.h"
|
||||
|
||||
static virCapsPtr caps;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "datatypes.h"
|
||||
#include "storage/storage_backend.h"
|
||||
#include "testutilsqemu.h"
|
||||
#include "virstring.h"
|
||||
|
||||
const char create_tool[] = "qemu-img";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "virrandom.h"
|
||||
#include "dirname.h"
|
||||
#include "virprocess.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#if TEST_OOM_TRACE
|
||||
# include <execinfo.h>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -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 { \
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -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 { \
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "testutils.h"
|
||||
|
||||
#include "viridentity.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "virfile.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#include "rpc/virnetsocket.h"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include "internal.h"
|
||||
#include "virxml.h"
|
||||
#include "virutil.h"
|
||||
#include "testutils.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "virerror.h"
|
||||
#include "virlog.h"
|
||||
#include "virstoragefile.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virutil.h"
|
||||
#include "virerror.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
# include "internal.h"
|
||||
# include "viralloc.h"
|
||||
# include "vmx/vmx.h"
|
||||
# include "virstring.h"
|
||||
|
||||
static virCapsPtr caps;
|
||||
static virDomainXMLOptionPtr xmlopt;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "testutils.h"
|
||||
#include "testutilsxen.h"
|
||||
#include "viralloc.h"
|
||||
#include "virstring.h"
|
||||
|
||||
static virCapsPtr caps;
|
||||
static virDomainXMLOptionPtr xmlopt;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "xenxs/xen_sxpr.h"
|
||||
#include "testutils.h"
|
||||
#include "testutilsxen.h"
|
||||
#include "virstring.h"
|
||||
|
||||
static virCapsPtr caps;
|
||||
static virDomainXMLOptionPtr xmlopt;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
# include "internal.h"
|
||||
# include "viralloc.h"
|
||||
# include "vmx/vmx.h"
|
||||
# include "virstring.h"
|
||||
|
||||
static virCapsPtr caps;
|
||||
static virVMXContext ctx;
|
||||
|
||||
Reference in New Issue
Block a user