^python/(libvirt-(lxc-|qemu-)?override|typewrappers)\.c$$
exclude_file_name_regexp--sc_prohibit_asprintf = \
- ^(bootstrap.conf$$|src/util/virutil\.c$$|examples/domain-events/events-c/event-test\.c$$|tests/vircgroupmock\.c$$)
+ ^(bootstrap.conf$$|src/util/virstring\.c$$|examples/domain-events/events-c/event-test\.c$$|tests/vircgroupmock\.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vircgroupmock\.c)$$)
exclude_file_name_regexp--sc_prohibit_sprintf = \
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)$$
-exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virutil\.c$$
+exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
exclude_file_name_regexp--sc_prohibit_strtol = \
^src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c$$
#include "configmake.h"
#include "remote/remote_protocol.h"
#include "remote/remote_driver.h"
+#include "virstring.h"
+#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_CONF
#include "libvirtd.h"
#include "libvirtd-config.h"
-#include "virutil.h"
#include "viruuid.h"
#include "remote_driver.h"
#include "viralloc.h"
#include "virhook.h"
#include "viraudit.h"
#include "locking/lock_manager.h"
+#include "virstring.h"
#ifdef WITH_DRIVER_MODULES
# include "driver.h"
#include "datatypes.h"
#include "viralloc.h"
#include "virlog.h"
-#include "virutil.h"
#include "stream.h"
#include "viruuid.h"
#include "vircommand.h"
#include "remote_protocol.h"
#include "qemu_protocol.h"
#include "lxc_protocol.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_RPC
#include "virtypedparam.h"
#include "ignore-value.h"
#include "virutil.h"
+#include "virstring.h"
#ifndef __CYGWIN__
extern void initlibvirtmod(void);
#include "capabilities.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "viruuid.h"
#include "cpu_conf.h"
#include "virerror.h"
#include "virerror.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virbuffer.h"
#include "cpu_conf.h"
#include "domain_conf.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_CPU
#include "viralloc.h"
#include "virxml.h"
#include "viruuid.h"
-#include "virutil.h"
#include "virbuffer.h"
#include "device_conf.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_DEVICE
#include "viruuid.h"
#include "virlog.h"
#include "viralloc.h"
+#include "virstring.h"
/* Return nn:mm in hex for block and character devices, and NULL
* for other file types, stat failure, or allocation failure. */
#include "verify.h"
#include "virxml.h"
#include "viruuid.h"
-#include "virutil.h"
#include "virbuffer.h"
#include "virlog.h"
#include "nwfilter_conf.h"
#include "netdev_vlan_conf.h"
#include "device_conf.h"
#include "virtpm.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_DOMAIN
# include "capabilities.h"
# include "storage_encryption_conf.h"
# include "cpu_conf.h"
-# include "virutil.h"
# include "virthread.h"
# include "virhash.h"
# include "virsocketaddr.h"
#include "viralloc.h"
#include "virxml.h"
#include "viruuid.h"
-#include "virutil.h"
#include "virbuffer.h"
#define VIR_FROM_THIS VIR_FROM_INTERFACE
#include "netdev_bandwidth_conf.h"
#include "virerror.h"
-#include "virutil.h"
#include "viralloc.h"
#include "domain_conf.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "netdev_vport_profile_conf.h"
#include "virerror.h"
#include "viralloc.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "viralloc.h"
#include "virxml.h"
#include "viruuid.h"
-#include "virutil.h"
#include "virbuffer.h"
#include "c-ctype.h"
#include "virfile.h"
+#include "virstring.h"
#define MAX_BRIDGE_ID 256
#define VIR_FROM_THIS VIR_FROM_NETWORK
#include "node_device_conf.h"
#include "virxml.h"
-#include "virutil.h"
#include "virbuffer.h"
#include "viruuid.h"
#include "virrandom.h"
#include "domain_conf.h"
#include "c-ctype.h"
#include "virfile.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
# include "internal.h"
-# include "virutil.h"
# include "virhash.h"
# include "virxml.h"
# include "virbuffer.h"
#include "nwfilter_params.h"
#include "domain_conf.h"
#include "virlog.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
#include "viralloc.h"
#include "secret_conf.h"
#include "virerror.h"
-#include "virutil.h"
#include "virxml.h"
#include "viruuid.h"
#include "secret_conf.h"
#include "snapshot_conf.h"
#include "virstoragefile.h"
-#include "virutil.h"
#include "viruuid.h"
#include "virfile.h"
#include "virerror.h"
#include "virxml.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT
#include "virxml.h"
#include "viruuid.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
# define __VIR_STORAGE_CONF_H__
# include "internal.h"
-# include "virutil.h"
# include "storage_encryption_conf.h"
# include "virthread.h"
#include "viralloc.h"
#include "storage_conf.h"
#include "storage_encryption_conf.h"
-#include "virutil.h"
#include "virxml.h"
#include "virerror.h"
#include "viruuid.h"
#include "virlog.h"
#include "virerror.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virlog.h"
#include "viralloc.h"
-#include "virutil.h"
#include "cpu.h"
#include "cpu_map.h"
#include "virlog.h"
#include "viralloc.h"
-#include "virutil.h"
#include "cpu.h"
#include "cpu_map.h"
#include "cpu_x86.h"
#include "virbuffer.h"
#include "virendian.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_CPU
#include "virlog.h"
#include "viralloc.h"
#include "viruuid.h"
-#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "driver.h"
#include "viralloc.h"
#include "virlog.h"
-#include "virutil.h"
#include "configmake.h"
+#include "virstring.h"
#define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/connection-driver"
#include <config.h>
#include "internal.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "domain_conf.h"
#include "snapshot_conf.h"
#include "virauth.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "esx_vi_methods.h"
#include "esx_util.h"
#include "viruri.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ESX
#include <config.h>
#include "internal.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "md5.h"
#include "internal.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include <config.h>
#include "internal.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include <config.h>
#include "internal.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "md5.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "md5.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "esx_vi.h"
#include "esx_vi_methods.h"
#include "esx_util.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ESX
#include "internal.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "vmx.h"
#include "esx_private.h"
#include "esx_util.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ESX
#include "virbuffer.h"
#include "viralloc.h"
#include "virlog.h"
-#include "virutil.h"
#include "viruuid.h"
#include "vmx.h"
#include "virxml.h"
#include "esx_vi.h"
#include "esx_vi_methods.h"
#include "esx_util.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ESX
#include "datatypes.h"
#include "viralloc.h"
#include "virlog.h"
-#include "virutil.h"
#include "esx_vi.h"
#include "esx_vi_types.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ESX
#include "virutil.h"
#include "virfile.h"
#include "configmake.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STREAMS
#include "internal.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "datatypes.h"
#include "domain_conf.h"
#include "virauth.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "hyperv_util.h"
#include "hyperv_wmi.h"
#include "openwsman.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_HYPERV
#include "internal.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "internal.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
#include "datatypes.h"
#include "virlog.h"
#include "viralloc.h"
-#include "virutil.h"
#include "viruuid.h"
#include "virbuffer.h"
#include "hyperv_private.h"
#include "hyperv_wmi.h"
+#include "virstring.h"
#define WS_SERIALIZER_FREE_MEM_WORKS 0
#include "interface_driver.h"
#include "interface_conf.h"
#include "viralloc.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_INTERFACE
#include "virrandom.h"
#include "viruri.h"
#include "virthread.h"
+#include "virstring.h"
#ifdef WITH_TEST
# include "test/test_driver.h"
# util/virstring.h
+virArgvToString;
+virAsprintf;
+virSkipSpaces;
+virSkipSpacesAndBackslash;
+virSkipSpacesBackwards;
+virStrcpy;
virStringArrayHasString;
virStringFreeList;
virStringJoin;
virStringSplit;
+virStrncpy;
+virStrToDouble;
+virStrToLong_i;
+virStrToLong_l;
+virStrToLong_ll;
+virStrToLong_ui;
+virStrToLong_ul;
+virStrToLong_ull;
+virTrimSpaces;
+virVasprintf;
# util/virsysinfo.h
saferead;
safewrite;
safezero;
-virArgvToString;
-virAsprintf;
virBuildPathInternal;
virCompareLimitUlong;
virDirCreate;
virSetNonBlock;
virSetUIDGID;
virSetUIDGIDWithCaps;
-virSkipSpaces;
-virSkipSpacesAndBackslash;
-virSkipSpacesBackwards;
-virStrcpy;
virStrIsPrint;
-virStrncpy;
-virStrToDouble;
-virStrToLong_i;
-virStrToLong_l;
-virStrToLong_ll;
-virStrToLong_ui;
-virStrToLong_ul;
-virStrToLong_ull;
-virTrimSpaces;
virValidateWWN;
-virVasprintf;
# util/viruuid.h
#include "xen_xm.h"
#include "virtypedparam.h"
#include "viruri.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LIBXL
#include "virrandom.h"
#include "virhash.h"
#include "viruuid.h"
+#include "virstring.h"
#include "locking/lock_daemon_dispatch.h"
#include "locking/lock_protocol.h"
#include "virlog.h"
#include "rpc/virnetserver.h"
#include "configmake.h"
+#include "virstring.h"
+#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_CONF
#include "rpc/virnetserver.h"
#include "rpc/virnetserverclient.h"
-#include "virutil.h"
#include "virlog.h"
#include "lock_daemon.h"
#include "viralloc.h"
#include "virlog.h"
#include "viruuid.h"
-#include "virutil.h"
#include "virfile.h"
#include "virerror.h"
#include "rpc/virnetclient.h"
#include "lock_protocol.h"
#include "configmake.h"
#include "sha256.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LOCKING
#include "virlog.h"
#include "virerror.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virfile.h"
#include "md5.h"
#include "virconf.h"
#include "lock_driver_nop.h"
#include "virerror.h"
#include "virlog.h"
-#include "virutil.h"
#include "viralloc.h"
#include "viruuid.h"
+#include "virstring.h"
#if HAVE_DLFCN_H
# include <dlfcn.h>
#include "virlog.h"
#include "viralloc.h"
#include "vircgroup.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "virerror.h"
#include "virlog.h"
#include "lxc_container.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virnetdevveth.h"
#include "viruuid.h"
#include "vircommand.h"
#include "virnetdev.h"
#include "virprocess.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "virerror.h"
#include "virlog.h"
-#include "virutil.h"
#include "lxc_conf.h"
#include "lxc_container.h"
#include "virprocess.h"
#include "virnuma.h"
#include "rpc/virnetserver.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "lxc_driver.h"
#include "lxc_process.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virnetdevbridge.h"
#include "virnetdevveth.h"
#include "nodeinfo.h"
#include "virtime.h"
#include "virtypedparam.h"
#include "viruri.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "virlog.h"
#include "virfile.h"
#include "virbuffer.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
# endif
# include "lxc_conf.h"
-# include "virutil.h"
# include "viralloc.h"
struct virLXCMeminfo {
#include "virlog.h"
#include "virthread.h"
#include "rpc/virnetclient.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "vircommand.h"
#include "lxc_hostdev.h"
#include "virhook.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "driver.h"
#include "virbuffer.h"
#include "virpidfile.h"
-#include "virutil.h"
#include "vircommand.h"
#include "viralloc.h"
#include "viruuid.h"
#include "virnetdevvportprofile.h"
#include "virdbus.h"
#include "virfile.h"
+#include "virstring.h"
#define NETWORK_PID_DIR LOCALSTATEDIR "/run/libvirt/network"
#define NETWORK_STATE_DIR LOCALSTATEDIR "/lib/libvirt/network"
#include "node_device_conf.h"
#include "node_device_hal.h"
#include "node_device_driver.h"
-#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_NODEDEV
#include "viralloc.h"
#include "virlog.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NODEDEV
#include "virlog.h"
#include "viralloc.h"
#include "viruuid.h"
-#include "virutil.h"
#include "virbuffer.h"
#include "virpci.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NODEDEV
#include "viralloc.h"
#include "nodeinfo.h"
#include "physmem.h"
-#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
#include "count-one-bits.h"
#include "virarch.h"
#include "virfile.h"
#include "virtypedparam.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virthreadpool.h"
#include "configmake.h"
#include "virtime.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
#include "nwfilter_driver.h"
#include "nwfilter_gentech_driver.h"
#include "configmake.h"
+#include "virstring.h"
#include "nwfilter_ipaddrmap.h"
#include "nwfilter_dhcpsnoop.h"
#include "vircommand.h"
#include "configmake.h"
#include "intprops.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
#include "nwfilter_ebiptables_driver.h"
#include "nwfilter_ipaddrmap.h"
#include "nwfilter_learnipaddr.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
#include "viruuid.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "nodeinfo.h"
#include "virfile.h"
#include "vircommand.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_OPENVZ
#include "openvz_driver.h"
#include "openvz_util.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "openvz_conf.h"
#include "nodeinfo.h"
#include "viralloc.h"
#include "vircommand.h"
#include "viruri.h"
#include "virstatslinux.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_OPENVZ
#include "datatypes.h"
#include "virerror.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virlog.h"
#include "vircommand.h"
#include "configmake.h"
#include "virstoragefile.h"
#include "nodeinfo.h"
#include "c-ctype.h"
+#include "virstring.h"
#include "parallels_driver.h"
#include "parallels_utils.h"
#include "viralloc.h"
#include "virerror.h"
#include "md5.h"
-
#include "parallels_utils.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_PARALLELS
#define PARALLELS_ROUTED_NETWORK_UUID "eb593dd1-6846-45b0-84a0-de0729286982"
#include "configmake.h"
#include "virstoragefile.h"
#include "virerror.h"
-
#include "parallels_utils.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_PARALLELS
#include "virerror.h"
#include "viralloc.h"
#include "virjson.h"
-
#include "parallels_utils.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_PARALLELS
#include "internal.h"
#include "virauth.h"
-#include "virutil.h"
#include "datatypes.h"
#include "virbuffer.h"
#include "viralloc.h"
#include "nodeinfo.h"
#include "virfile.h"
#include "interface_conf.h"
-
#include "phyp_driver.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_PHYP
#include "virprocess.h"
#include "virtime.h"
#include "virobject.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "virebtables.h"
#include "qemu_conf.h"
#include "qemu_driver.h"
-#include "virutil.h"
#include "virerror.h"
#include "virlog.h"
#include "viralloc.h"
#include "virlog.h"
#include "virerror.h"
-#include "virutil.h"
#include "virfile.h"
#include "virpidfile.h"
#include "virprocess.h"
#include "virlog.h"
#include "viralloc.h"
#include "virerror.h"
-#include "virutil.h"
#include "domain_audit.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "virlog.h"
#include "virarch.h"
#include "virerror.h"
-#include "virutil.h"
#include "virfile.h"
#include "virnetdev.h"
#include "virstring.h"
#include "viruuid.h"
#include "virbuffer.h"
#include "virconf.h"
-#include "virutil.h"
#include "viralloc.h"
#include "datatypes.h"
#include "virxml.h"
#include "domain_event.h"
#include "virtime.h"
#include "virstoragefile.h"
+#include "virstring.h"
#include <sys/time.h>
#include <fcntl.h>
#include "virlog.h"
#include "datatypes.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "nodeinfo.h"
#include "virstatslinux.h"
#include "capabilities.h"
#include "virtime.h"
#include "virtypedparam.h"
#include "virbitmap.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "virnetdevtap.h"
#include "device_conf.h"
#include "virstoragefile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#define CHANGE_MEDIA_RETRIES 10
#include "virlog.h"
#include "virerror.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virfile.h"
#include "datatypes.h"
#include "fdstream.h"
#include "virstoragefile.h"
#include "viruri.h"
#include "virhook.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "virfile.h"
#include "virprocess.h"
#include "virobject.h"
+#include "virstring.h"
#ifdef WITH_DTRACE_PROBES
# include "libvirt_qemu_probes.h"
#include "datatypes.h"
#include "virerror.h"
#include "virbuffer.h"
+#include "virstring.h"
#ifdef WITH_DTRACE_PROBES
# include "libvirt_qemu_probes.h"
#include "virhook.h"
#include "virfile.h"
#include "virpidfile.h"
-#include "virutil.h"
#include "c-ctype.h"
#include "nodeinfo.h"
#include "domain_audit.h"
#include "virbitmap.h"
#include "viratomic.h"
#include "virnuma.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "lxc_protocol.h"
#include "qemu_protocol.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virfile.h"
#include "vircommand.h"
#include "intprops.h"
#include "viruri.h"
#include "virauth.h"
#include "virauthconfig.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_REMOTE
#include "virthread.h"
#include "virfile.h"
#include "virlog.h"
-#include "virutil.h"
#include "virerror.h"
#include "virnetsocket.h"
#include "virkeepaliveprotocol.h"
#include "viralloc.h"
#include "virthread.h"
#include "virkeepalive.h"
+#include "virstring.h"
+#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_RPC
#include "virfile.h"
#include "virthread.h"
#include "virprocess.h"
-
+#include "virstring.h"
#include "passfd.h"
#if WITH_SSH2
#include "virutil.h"
#include "virerror.h"
#include "virobject.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SSH
#include "gnutls_1_0_compat.h"
#include "virnettlscontext.h"
+#include "virstring.h"
#include "viralloc.h"
#include "virerror.h"
#include "secret_conf.h"
#include "secret_driver.h"
#include "virthread.h"
-#include "virutil.h"
#include "viruuid.h"
#include "virerror.h"
#include "virfile.h"
#include "configmake.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SECRET
#include "internal.h"
#include "security_apparmor.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virerror.h"
#include "datatypes.h"
#include "configmake.h"
#include "vircommand.h"
#include "virlog.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SECURITY
#define SECURITY_APPARMOR_VOID_DOI "0"
#include "security_dac.h"
#include "virerror.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "virpci.h"
#include "virusb.h"
#include "virstoragefile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SECURITY
#define SECURITY_DAC_NAME "dac"
#include "security_driver.h"
#include "security_selinux.h"
#include "virerror.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "virpci.h"
#include "virrandom.h"
#include "virconf.h"
#include "virtpm.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SECURITY
#include "internal.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "viralloc.h"
#include "vircommand.h"
#include "virfile.h"
#include "configmake.h"
#include "virrandom.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SECURITY
#include "datatypes.h"
#include "virerror.h"
-#include "virutil.h"
#include "viralloc.h"
#include "internal.h"
#include "secret_conf.h"
#include "virlog.h"
#include "virfile.h"
#include "stat-time.h"
+#include "virstring.h"
#if WITH_STORAGE_LVM
# include "storage_backend_logical.h"
#include "virerror.h"
#include "virlog.h"
#include "storage_backend_disk.h"
-#include "virutil.h"
#include "viralloc.h"
#include "vircommand.h"
#include "configmake.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "virxml.h"
#include "virfile.h"
#include "virlog.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "virerror.h"
#include "storage_backend_scsi.h"
#include "storage_backend_iscsi.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "virfile.h"
#include "vircommand.h"
#include "virrandom.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "viralloc.h"
#include "virlog.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "viralloc.h"
#include "virlog.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "virerror.h"
#include "storage_backend_rbd.h"
#include "storage_conf.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "base64.h"
#include "virlog.h"
#include "virfile.h"
#include "vircommand.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "storage_backend_sheepdog.h"
#include "storage_conf.h"
#include "vircommand.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "virerror.h"
#include "datatypes.h"
#include "driver.h"
-#include "virutil.h"
#include "storage_driver.h"
#include "storage_conf.h"
#include "viralloc.h"
#include "virfile.h"
#include "fdstream.h"
#include "configmake.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "datatypes.h"
#include "test_driver.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "viruuid.h"
#include "capabilities.h"
#include "configmake.h"
#include "virfile.h"
#include "virtypedparam.h"
#include "virrandom.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_TEST
#include "viruuid.h"
#include "virbuffer.h"
#include "virconf.h"
-#include "virutil.h"
#include "viralloc.h"
#include "nodeinfo.h"
#include "virlog.h"
#include "vircommand.h"
#include "virnetdevtap.h"
#include "virnodesuspend.h"
-
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_UML
#include "uml_driver.h"
#include "uml_conf.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "nodeinfo.h"
#include "virstatslinux.h"
#include "capabilities.h"
#include "virnodesuspend.h"
#include "virprocess.h"
#include "viruri.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_UML
#include "virerror.h"
#include "configmake.h"
#include "virrandom.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "virerror.h"
#include "virlog.h"
#include "viraudit.h"
-#include "virutil.h"
#include "virfile.h"
#include "viralloc.h"
+#include "virstring.h"
/* Provide the macros in case the header file is old.
FIXME: should be removed. */
#include "virerror.h"
#include "configmake.h"
#include "virauthconfig.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_AUTH
#include "virkeyfile.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
-
+#include "virstring.h"
struct _virAuthConfig {
virKeyFilePtr keyfile;
#include "virbitmap.h"
#include "viralloc.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "c-ctype.h"
#include "count-one-bits.h"
-
+#include "virstring.h"
struct _virBitmap {
size_t max_bit;
#include "virprocess.h"
#include "virbuffer.h"
#include "virthread.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
# define __VIR_COMMAND_H__
# include "internal.h"
-# include "virutil.h"
# include "virbuffer.h"
typedef struct _virCommand virCommand;
#include "virerror.h"
#include "virlog.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NETWORK
#define DNSMASQ_HOSTSFILE_SUFFIX "hostsfile"
#include "virerror.h"
#include "virlog.h"
#include "virthread.h"
+#include "virstring.h"
+#include "virutil.h"
#if HAVE_FIREWALLD
static char *firewall_cmd_path = NULL;
#include "viralloc.h"
#include "virthread.h"
#include "virutil.h"
+#include "virstring.h"
virThreadLocal virLastErr;
#include "viralloc.h"
#include "virerror.h"
#include "virlog.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
# define __VIR_HOOKS_H__
# include "internal.h"
-# include "virutil.h"
enum virHookDriverType {
VIR_HOOK_DRIVER_DAEMON = 0, /* Daemon related events */
#include "virutil.h"
#include "viralloc.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_INITCTL
#include "virerror.h"
#include "virlog.h"
#include "virthread.h"
+#include "virstring.h"
+#include "virutil.h"
#if HAVE_FIREWALLD
static char *firewall_cmd_path = NULL;
#include "viralloc.h"
#include "virerror.h"
#include "virlog.h"
+#include "virstring.h"
#include "virutil.h"
#if WITH_YAJL
#include "virfile.h"
#include "virhash.h"
#include "virthread.h"
+#include "virstring.h"
#include <fcntl.h>
#include <unistd.h>
#include "virfile.h"
#include "virtime.h"
#include "intprops.h"
+#include "virstring.h"
/* Journald output is only supported on Linux new enough to expose
* htole64. */
#include "viralloc.h"
#include "virpci.h"
#include "virlog.h"
+#include "virstring.h"
+#include "virutil.h"
#include <sys/ioctl.h>
#include <net/if.h>
#include "vircommand.h"
#include "viralloc.h"
#include "virerror.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virfile.h"
#include "viralloc.h"
#include "intprops.h"
+#include "virstring.h"
#include <sys/ioctl.h>
#include <sys/socket.h>
#include "virnetdevmacvlan.h"
#include "virmacaddr.h"
-#include "virutil.h"
#include "virerror.h"
#include "virthread.h"
#include "viralloc.h"
#include "virerror.h"
#include "virmacaddr.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
# define __VIR_NETDEV_OPENVSWITCH_H__
# include "internal.h"
-# include "virutil.h"
# include "virnetdevvportprofile.h"
# include "virnetdevvlan.h"
#include "virfile.h"
#include "viralloc.h"
#include "virlog.h"
-#include "virutil.h"
+#include "virstring.h"
#include <sys/ioctl.h>
#include <net/if.h>
#include "virlog.h"
#include "vircommand.h"
#include "virerror.h"
+#include "virstring.h"
+#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virnetdevvportprofile.h"
#include "virerror.h"
#include "viralloc.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NET
#include "vircommand.h"
#include "virerror.h"
#include "virfile.h"
+#include "virstring.h"
+#include "virutil.h"
#define PCI_SYSFS "/sys/bus/pci/"
#define PCI_ID_LEN 10 /* "XXXX XXXX" */
#include "virerror.h"
#include "c-ctype.h"
#include "areadlink.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virfile.h"
#include "virlog.h"
#include "virutil.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virutil.h"
#include "virerror.h"
#include "virlog.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "virerror.h"
#include "virsexpr.h"
-#include "virutil.h"
#include "viralloc.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SEXPR
#include "virsocketaddr.h"
#include "virerror.h"
-#include "virutil.h"
+#include "virstring.h"
#include <netdb.h>
# include "virerror.h"
# include "datatypes.h"
-# include "virutil.h"
# include "virstatslinux.h"
# include "viralloc.h"
# include "virfile.h"
#include "vircommand.h"
#include "virhash.h"
#include "virendian.h"
+#include "virstring.h"
+#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include <config.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "c-ctype.h"
#include "virstring.h"
#include "viralloc.h"
#include "virbuffer.h"
return false;
}
+
+/* Like strtol, but produce an "int" result, and check more carefully.
+ Return 0 upon success; return -1 to indicate failure.
+ When END_PTR is NULL, the byte after the final valid digit must be NUL.
+ Otherwise, it's like strtol and lets the caller check any suffix for
+ validity. This function is careful to return -1 when the string S
+ represents a number that is not representable as an "int". */
+int
+virStrToLong_i(char const *s, char **end_ptr, int base, int *result)
+{
+ long int val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtol(s, &p, base); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s || (int) val != val);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+/* Just like virStrToLong_i, above, but produce an "unsigned int" value. */
+int
+virStrToLong_ui(char const *s, char **end_ptr, int base, unsigned int *result)
+{
+ unsigned long int val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtoul(s, &p, base); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s || (unsigned int) val != val);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+/* Just like virStrToLong_i, above, but produce a "long" value. */
+int
+virStrToLong_l(char const *s, char **end_ptr, int base, long *result)
+{
+ long int val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtol(s, &p, base); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+/* Just like virStrToLong_i, above, but produce an "unsigned long" value. */
+int
+virStrToLong_ul(char const *s, char **end_ptr, int base, unsigned long *result)
+{
+ unsigned long int val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtoul(s, &p, base); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+/* Just like virStrToLong_i, above, but produce a "long long" value. */
+int
+virStrToLong_ll(char const *s, char **end_ptr, int base, long long *result)
+{
+ long long val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtoll(s, &p, base); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+/* Just like virStrToLong_i, above, but produce an "unsigned long long" value. */
+int
+virStrToLong_ull(char const *s, char **end_ptr, int base, unsigned long long *result)
+{
+ unsigned long long val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtoull(s, &p, base); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+int
+virStrToDouble(char const *s,
+ char **end_ptr,
+ double *result)
+{
+ double val;
+ char *p;
+ int err;
+
+ errno = 0;
+ val = strtod(s, &p); /* exempt from syntax-check */
+ err = (errno || (!end_ptr && *p) || p == s);
+ if (end_ptr)
+ *end_ptr = p;
+ if (err)
+ return -1;
+ *result = val;
+ return 0;
+}
+
+/**
+ * virVasprintf
+ *
+ * like glibc's vasprintf but makes sure *strp == NULL on failure
+ */
+int
+virVasprintf(char **strp, const char *fmt, va_list list)
+{
+ int ret;
+
+ if ((ret = vasprintf(strp, fmt, list)) == -1)
+ *strp = NULL;
+
+ return ret;
+}
+
+/**
+ * virAsprintf
+ *
+ * like glibc's_asprintf but makes sure *strp == NULL on failure
+ */
+int
+virAsprintf(char **strp, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = virVasprintf(strp, fmt, ap);
+ va_end(ap);
+ return ret;
+}
+
+/**
+ * virStrncpy
+ *
+ * A safe version of strncpy. The last parameter is the number of bytes
+ * available in the destination string, *not* the number of bytes you want
+ * to copy. If the destination is not large enough to hold all n of the
+ * src string bytes plus a \0, NULL is returned and no data is copied.
+ * If the destination is large enough to hold the n bytes plus \0, then the
+ * string is copied and a pointer to the destination string is returned.
+ */
+char *
+virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
+{
+ char *ret;
+
+ if (n > (destbytes - 1))
+ return NULL;
+
+ ret = strncpy(dest, src, n);
+ /* strncpy NULL terminates iff the last character is \0. Therefore
+ * force the last byte to be \0
+ */
+ dest[n] = '\0';
+
+ return ret;
+}
+
+/**
+ * virStrcpy
+ *
+ * A safe version of strcpy. The last parameter is the number of bytes
+ * available in the destination string, *not* the number of bytes you want
+ * to copy. If the destination is not large enough to hold all n of the
+ * src string bytes plus a \0, NULL is returned and no data is copied.
+ * If the destination is large enough to hold the source plus \0, then the
+ * string is copied and a pointer to the destination string is returned.
+ */
+char *
+virStrcpy(char *dest, const char *src, size_t destbytes)
+{
+ return virStrncpy(dest, src, strlen(src), destbytes);
+}
+
+/**
+ * virSkipSpaces:
+ * @str: pointer to the char pointer used
+ *
+ * Skip potential blanks, this includes space tabs, line feed,
+ * carriage returns.
+ */
+void
+virSkipSpaces(const char **str)
+{
+ const char *cur = *str;
+
+ while (c_isspace(*cur))
+ cur++;
+ *str = cur;
+}
+
+/**
+ * virSkipSpacesAndBackslash:
+ * @str: pointer to the char pointer used
+ *
+ * Like virSkipSpaces, but also skip backslashes erroneously emitted
+ * by xend
+ */
+void
+virSkipSpacesAndBackslash(const char **str)
+{
+ const char *cur = *str;
+
+ while (c_isspace(*cur) || *cur == '\\')
+ cur++;
+ *str = cur;
+}
+
+/**
+ * virTrimSpaces:
+ * @str: string to modify to remove all trailing spaces
+ * @endp: track the end of the string
+ *
+ * If @endp is NULL on entry, then all spaces prior to the trailing
+ * NUL in @str are removed, by writing NUL into the appropriate
+ * location. If @endp is non-NULL but points to a NULL pointer,
+ * then all spaces prior to the trailing NUL in @str are removed,
+ * NUL is written to the new string end, and endp is set to the
+ * location of the (new) string end. If @endp is non-NULL and
+ * points to a non-NULL pointer, then that pointer is used as
+ * the end of the string, endp is set to the (new) location, but
+ * no NUL pointer is written into the string.
+ */
+void
+virTrimSpaces(char *str, char **endp)
+{
+ char *end;
+
+ if (!endp || !*endp)
+ end = str + strlen(str);
+ else
+ end = *endp;
+ while (end > str && c_isspace(end[-1]))
+ end--;
+ if (endp) {
+ if (!*endp)
+ *end = '\0';
+ *endp = end;
+ } else {
+ *end = '\0';
+ }
+}
+
+/**
+ * virSkipSpacesBackwards:
+ * @str: start of string
+ * @endp: on entry, *endp must be NULL or a location within @str, on exit,
+ * will be adjusted to skip trailing spaces, or to NULL if @str had nothing
+ * but spaces.
+ */
+void
+virSkipSpacesBackwards(const char *str, char **endp)
+{
+ /* Casting away const is safe, since virTrimSpaces does not
+ * modify string with this particular usage. */
+ char *s = (char*) str;
+
+ if (!*endp)
+ *endp = s + strlen(s);
+ virTrimSpaces(s, endp);
+ if (s == *endp)
+ *endp = NULL;
+}
+
+char *
+virArgvToString(const char *const *argv)
+{
+ int len, i;
+ char *ret, *p;
+
+ for (len = 1, i = 0; argv[i]; i++)
+ len += strlen(argv[i]) + 1;
+
+ if (VIR_ALLOC_N(ret, len) < 0)
+ return NULL;
+ p = ret;
+
+ for (i = 0; argv[i]; i++) {
+ if (i != 0)
+ *(p++) = ' ';
+
+ strcpy(p, argv[i]);
+ p += strlen(argv[i]);
+ }
+
+ *p = '\0';
+
+ return ret;
+}
#ifndef __VIR_STRING_H__
# define __VIR_STRING_H__
+# include <stdarg.h>
+
# include "internal.h"
char **virStringSplit(const char *string,
bool virStringArrayHasString(char **strings, const char *needle);
+char *virArgvToString(const char *const *argv);
+
+int virStrToLong_i(char const *s,
+ char **end_ptr,
+ int base,
+ int *result);
+
+int virStrToLong_ui(char const *s,
+ char **end_ptr,
+ int base,
+ unsigned int *result);
+int virStrToLong_l(char const *s,
+ char **end_ptr,
+ int base,
+ long *result);
+int virStrToLong_ul(char const *s,
+ char **end_ptr,
+ int base,
+ unsigned long *result);
+int virStrToLong_ll(char const *s,
+ char **end_ptr,
+ int base,
+ long long *result);
+int virStrToLong_ull(char const *s,
+ char **end_ptr,
+ int base,
+ unsigned long long *result);
+int virStrToDouble(char const *s,
+ char **end_ptr,
+ double *result);
+
+void virSkipSpaces(const char **str) ATTRIBUTE_NONNULL(1);
+void virSkipSpacesAndBackslash(const char **str) ATTRIBUTE_NONNULL(1);
+void virTrimSpaces(char *str, char **endp) ATTRIBUTE_NONNULL(1);
+void virSkipSpacesBackwards(const char *str, char **endp)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+
+int virAsprintf(char **strp, const char *fmt, ...)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 3)
+ ATTRIBUTE_RETURN_CHECK;
+int virVasprintf(char **strp, const char *fmt, va_list list)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 0)
+ ATTRIBUTE_RETURN_CHECK;
+char *virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
+ ATTRIBUTE_RETURN_CHECK;
+char *virStrcpy(char *dest, const char *src, size_t destbytes)
+ ATTRIBUTE_RETURN_CHECK;
+# define virStrcpyStatic(dest, src) virStrcpy((dest), (src), sizeof(dest))
#endif /* __VIR_STRING_H__ */
#include "virerror.h"
#include "virsysinfo.h"
-#include "virutil.h"
#include "virlog.h"
#include "viralloc.h"
#include "vircommand.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_SYSINFO
#include <sys/time.h>
#include "virtime.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virerror.h"
#include <sys/stat.h>
-#include "virutil.h"
+#include "virstring.h"
#include "virerror.h"
#include "virtpm.h"
#include "viralloc.h"
#include "virutil.h"
#include "virerror.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "viruri.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virerror.h"
#include "virbuffer.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_URI
#include "viralloc.h"
#include "virutil.h"
#include "virerror.h"
+#include "virstring.h"
#define USB_SYSFS "/sys/bus/usb"
#define USB_ID_LEN 10 /* "1234 5678" */
#include <dirent.h>
#include <stdio.h>
#include <stdarg.h>
-#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "virerror.h"
#include "virlog.h"
#include "virbuffer.h"
-#include "virutil.h"
#include "virstoragefile.h"
#include "viralloc.h"
#include "virthread.h"
#include "nonblocking.h"
#include "passfd.h"
#include "virprocess.h"
+#include "virstring.h"
#ifndef NSIG
# define NSIG 32
return 1;
}
-char *
-virArgvToString(const char *const *argv)
-{
- int len, i;
- char *ret, *p;
-
- for (len = 1, i = 0; argv[i]; i++)
- len += strlen(argv[i]) + 1;
-
- if (VIR_ALLOC_N(ret, len) < 0)
- return NULL;
- p = ret;
-
- for (i = 0; argv[i]; i++) {
- if (i != 0)
- *(p++) = ' ';
-
- strcpy(p, argv[i]);
- p += strlen(argv[i]);
- }
-
- *p = '\0';
-
- return ret;
-}
-
#ifndef WIN32
int virSetInherit(int fd, bool inherit) {
return cleanpath;
}
-/* Like strtol, but produce an "int" result, and check more carefully.
- Return 0 upon success; return -1 to indicate failure.
- When END_PTR is NULL, the byte after the final valid digit must be NUL.
- Otherwise, it's like strtol and lets the caller check any suffix for
- validity. This function is careful to return -1 when the string S
- represents a number that is not representable as an "int". */
-int
-virStrToLong_i(char const *s, char **end_ptr, int base, int *result)
-{
- long int val;
- char *p;
- int err;
-
- errno = 0;
- val = strtol(s, &p, base); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s || (int) val != val);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
-/* Just like virStrToLong_i, above, but produce an "unsigned int" value. */
-int
-virStrToLong_ui(char const *s, char **end_ptr, int base, unsigned int *result)
-{
- unsigned long int val;
- char *p;
- int err;
-
- errno = 0;
- val = strtoul(s, &p, base); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s || (unsigned int) val != val);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
-/* Just like virStrToLong_i, above, but produce a "long" value. */
-int
-virStrToLong_l(char const *s, char **end_ptr, int base, long *result)
-{
- long int val;
- char *p;
- int err;
-
- errno = 0;
- val = strtol(s, &p, base); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
-/* Just like virStrToLong_i, above, but produce an "unsigned long" value. */
-int
-virStrToLong_ul(char const *s, char **end_ptr, int base, unsigned long *result)
-{
- unsigned long int val;
- char *p;
- int err;
-
- errno = 0;
- val = strtoul(s, &p, base); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
-/* Just like virStrToLong_i, above, but produce a "long long" value. */
-int
-virStrToLong_ll(char const *s, char **end_ptr, int base, long long *result)
-{
- long long val;
- char *p;
- int err;
-
- errno = 0;
- val = strtoll(s, &p, base); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
-/* Just like virStrToLong_i, above, but produce an "unsigned long long" value. */
-int
-virStrToLong_ull(char const *s, char **end_ptr, int base, unsigned long long *result)
-{
- unsigned long long val;
- char *p;
- int err;
-
- errno = 0;
- val = strtoull(s, &p, base); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
-int
-virStrToDouble(char const *s,
- char **end_ptr,
- double *result)
-{
- double val;
- char *p;
- int err;
-
- errno = 0;
- val = strtod(s, &p); /* exempt from syntax-check */
- err = (errno || (!end_ptr && *p) || p == s);
- if (end_ptr)
- *end_ptr = p;
- if (err)
- return -1;
- *result = val;
- return 0;
-}
-
/* Convert C from hexadecimal character to integer. */
int
virHexToBin(unsigned char c)
return 0;
}
-/**
- * virSkipSpaces:
- * @str: pointer to the char pointer used
- *
- * Skip potential blanks, this includes space tabs, line feed,
- * carriage returns.
- */
-void
-virSkipSpaces(const char **str)
-{
- const char *cur = *str;
-
- while (c_isspace(*cur))
- cur++;
- *str = cur;
-}
-
-/**
- * virSkipSpacesAndBackslash:
- * @str: pointer to the char pointer used
- *
- * Like virSkipSpaces, but also skip backslashes erroneously emitted
- * by xend
- */
-void
-virSkipSpacesAndBackslash(const char **str)
-{
- const char *cur = *str;
-
- while (c_isspace(*cur) || *cur == '\\')
- cur++;
- *str = cur;
-}
-
-/**
- * virTrimSpaces:
- * @str: string to modify to remove all trailing spaces
- * @endp: track the end of the string
- *
- * If @endp is NULL on entry, then all spaces prior to the trailing
- * NUL in @str are removed, by writing NUL into the appropriate
- * location. If @endp is non-NULL but points to a NULL pointer,
- * then all spaces prior to the trailing NUL in @str are removed,
- * NUL is written to the new string end, and endp is set to the
- * location of the (new) string end. If @endp is non-NULL and
- * points to a non-NULL pointer, then that pointer is used as
- * the end of the string, endp is set to the (new) location, but
- * no NUL pointer is written into the string.
- */
-void
-virTrimSpaces(char *str, char **endp)
-{
- char *end;
-
- if (!endp || !*endp)
- end = str + strlen(str);
- else
- end = *endp;
- while (end > str && c_isspace(end[-1]))
- end--;
- if (endp) {
- if (!*endp)
- *end = '\0';
- *endp = end;
- } else {
- *end = '\0';
- }
-}
-
-/**
- * virSkipSpacesBackwards:
- * @str: start of string
- * @endp: on entry, *endp must be NULL or a location within @str, on exit,
- * will be adjusted to skip trailing spaces, or to NULL if @str had nothing
- * but spaces.
- */
-void
-virSkipSpacesBackwards(const char *str, char **endp)
-{
- /* Casting away const is safe, since virTrimSpaces does not
- * modify string with this particular usage. */
- char *s = (char*) str;
-
- if (!*endp)
- *endp = s + strlen(s);
- virTrimSpaces(s, endp);
- if (s == *endp)
- *endp = NULL;
-}
/**
* virParseNumber:
return ret;
}
-
/**
* virParseVersionString:
* @str: const char pointer to the version string
return 0;
}
-/**
- * virVasprintf
- *
- * like glibc's vasprintf but makes sure *strp == NULL on failure
- */
-int
-virVasprintf(char **strp, const char *fmt, va_list list)
-{
- int ret;
-
- if ((ret = vasprintf(strp, fmt, list)) == -1)
- *strp = NULL;
-
- return ret;
-}
-
-/**
- * virAsprintf
- *
- * like glibc's_asprintf but makes sure *strp == NULL on failure
- */
-int
-virAsprintf(char **strp, const char *fmt, ...)
-{
- va_list ap;
- int ret;
-
- va_start(ap, fmt);
- ret = virVasprintf(strp, fmt, ap);
- va_end(ap);
- return ret;
-}
-
-/**
- * virStrncpy
- *
- * A safe version of strncpy. The last parameter is the number of bytes
- * available in the destination string, *not* the number of bytes you want
- * to copy. If the destination is not large enough to hold all n of the
- * src string bytes plus a \0, NULL is returned and no data is copied.
- * If the destination is large enough to hold the n bytes plus \0, then the
- * string is copied and a pointer to the destination string is returned.
- */
-char *
-virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
-{
- char *ret;
-
- if (n > (destbytes - 1))
- return NULL;
-
- ret = strncpy(dest, src, n);
- /* strncpy NULL terminates iff the last character is \0. Therefore
- * force the last byte to be \0
- */
- dest[n] = '\0';
-
- return ret;
-}
-
-/**
- * virStrcpy
- *
- * A safe version of strcpy. The last parameter is the number of bytes
- * available in the destination string, *not* the number of bytes you want
- * to copy. If the destination is not large enough to hold all n of the
- * src string bytes plus a \0, NULL is returned and no data is copied.
- * If the destination is large enough to hold the source plus \0, then the
- * string is copied and a pointer to the destination string is returned.
- */
-char *
-virStrcpy(char *dest, const char *src, size_t destbytes)
-{
- return virStrncpy(dest, src, strlen(src), destbytes);
-}
-
int virEnumFromString(const char *const*types,
unsigned int ntypes,
const char *type)
# include <unistd.h>
# include <sys/select.h>
# include <sys/types.h>
-# include <stdarg.h>
# ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
char **ttyName,
int rawmode);
-char *virArgvToString(const char *const *argv);
-
-int virStrToLong_i(char const *s,
- char **end_ptr,
- int base,
- int *result);
-
-int virStrToLong_ui(char const *s,
- char **end_ptr,
- int base,
- unsigned int *result);
-int virStrToLong_l(char const *s,
- char **end_ptr,
- int base,
- long *result);
-int virStrToLong_ul(char const *s,
- char **end_ptr,
- int base,
- unsigned long *result);
-int virStrToLong_ll(char const *s,
- char **end_ptr,
- int base,
- long long *result);
-int virStrToLong_ull(char const *s,
- char **end_ptr,
- int base,
- unsigned long long *result);
-int virStrToDouble(char const *s,
- char **end_ptr,
- double *result);
-
int virScaleInteger(unsigned long long *value, const char *suffix,
unsigned long long scale, unsigned long long limit)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
int virHexToBin(unsigned char c);
-void virSkipSpaces(const char **str) ATTRIBUTE_NONNULL(1);
-void virSkipSpacesAndBackslash(const char **str) ATTRIBUTE_NONNULL(1);
-void virTrimSpaces(char *str, char **endp) ATTRIBUTE_NONNULL(1);
-void virSkipSpacesBackwards(const char *str, char **endp)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
int virParseNumber(const char **str);
int virParseVersionString(const char *str, unsigned long *version,
bool allowMissing);
-int virAsprintf(char **strp, const char *fmt, ...)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 3)
- ATTRIBUTE_RETURN_CHECK;
-int virVasprintf(char **strp, const char *fmt, va_list list)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 0)
- ATTRIBUTE_RETURN_CHECK;
-char *virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
- ATTRIBUTE_RETURN_CHECK;
-char *virStrcpy(char *dest, const char *src, size_t destbytes)
- ATTRIBUTE_RETURN_CHECK;
-# define virStrcpyStatic(dest, src) virStrcpy((dest), (src), sizeof(dest))
int virDoubleToStr(char **strp, double number)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
#include "virutil.h"
#include "viralloc.h"
#include "virfile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_XML
#include "internal.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
#include "vbox_MSCOMGlue.h"
#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_VBOX
#include "vbox_driver.h"
#include "vbox_glue.h"
#include "virerror.h"
-#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_VBOX
#include "virfile.h"
#include "fdstream.h"
#include "viruri.h"
+#include "virstring.h"
/* This one changes from version to version. */
#if VBOX_API_VERSION == 2002
#include "viruuid.h"
#include "virerror.h"
#include "vmx.h"
-
#include "vmware_conf.h"
+#include "virstring.h"
/* Free all memory associated with a vmware_driver structure */
void
#include "datatypes.h"
#include "virfile.h"
#include "viralloc.h"
-#include "virutil.h"
#include "viruuid.h"
#include "vircommand.h"
#include "vmx.h"
#include "viruuid.h"
#include "vmx.h"
#include "viruri.h"
+#include "virstring.h"
/*
# include "virerror.h"
# include "datatypes.h"
-# include "virutil.h"
# include "block_stats.h"
# include "viralloc.h"
# include "virfile.h"
+# include "virstring.h"
# define VIR_FROM_THIS VIR_FROM_STATS_LINUX
# include "xen_inotify.h"
#endif
#include "virxml.h"
-#include "virutil.h"
#include "viralloc.h"
#include "node_device_conf.h"
#include "virpci.h"
#include "virnodesuspend.h"
#include "nodeinfo.h"
#include "configmake.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_XEN
#define XEN_SAVE_DIR LOCALSTATEDIR "/lib/libvirt/xen/save"
#include "virlog.h"
#include "datatypes.h"
#include "driver.h"
-#include "virutil.h"
#include "xen_driver.h"
#include "xen_hypervisor.h"
#include "xs_internal.h"
#include "virnodesuspend.h"
#include "virtypedparam.h"
#include "virendian.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_XEN
#include "datatypes.h"
#include "xend_internal.h"
#include "driver.h"
-#include "virutil.h"
#include "virsexpr.h"
#include "xen_sxpr.h"
#include "virbuffer.h"
#include "virfile.h"
#include "viruri.h"
#include "device_conf.h"
+#include "virstring.h"
/* required for cpumap_t */
#include <xen/dom0_ops.h>
#include "virhash.h"
#include "virbuffer.h"
#include "viruuid.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virlog.h"
#include "count-one-bits.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_XENXM
#include "virerror.h"
#include "datatypes.h"
#include "virauth.h"
-#include "virutil.h"
#include "viruuid.h"
#include "viralloc.h"
#include "virbuffer.h"
#include "xenapi_driver.h"
#include "xenapi_driver_private.h"
#include "xenapi_utils.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_XENAPI
#include "domain_conf.h"
#include "virerror.h"
#include "datatypes.h"
-#include "virutil.h"
#include "viruuid.h"
#include "viralloc.h"
#include "virbuffer.h"
#include "viruri.h"
#include "xenapi_driver_private.h"
#include "xenapi_utils.h"
+#include "virstring.h"
void
xenSessionFree(xen_session *session)
#include "xenxs_private.h"
#include "xen_sxpr.h"
#include "virstoragefile.h"
+#include "virstring.h"
/* Get a domain id from a S-expression string */
int xenGetDomIdFromSxprString(const char *sexpr, int xendConfigVersion)
#include "xen_sxpr.h"
#include "domain_conf.h"
#include "virstoragefile.h"
+#include "virstring.h"
/* Convenience method to grab a long int from the config file object */
static int xenXMConfigGetBool(virConfPtr conf,
#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
#include "cpu_conf.h"
#include "cpu/cpu.h"
#include "cpu/cpu_map.h"
+#include "virstring.h"
static const char *abs_top_srcdir;
# include "qemu/qemu_conf.h"
# include "qemu/qemu_domain.h"
# include "testutilsqemu.h"
+# include "virstring.h"
static virQEMUDriver driver;
# include "internal.h"
# include "viralloc.h"
-# include "virutil.h"
# include "vmx/vmx.h"
# include "esx/esx_util.h"
# include "esx/esx_vi_types.h"
#include "testutils.h"
#include "interface_conf.h"
#include "testutilsqemu.h"
-
+#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *xml)
#include "virerror.h"
#include "virlog.h"
#include "virconf.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
# include "internal.h"
# include "lxc/lxc_conf.h"
# include "testutilslxc.h"
+# include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;
#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)
#include "testutils.h"
#include "network_conf.h"
#include "testutilsqemu.h"
+#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
#include "testutils.h"
#include "node_device_conf.h"
#include "testutilsqemu.h"
+#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *xml)
#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__) || \
#include "nwfilter_params.h"
#include "nwfilter_conf.h"
#include "testutilsqemu.h"
+#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
# 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,
# include "internal.h"
# include "qemu/qemu_command.h"
-
# include "testutilsqemu.h"
+# include "virstring.h"
static virQEMUDriver driver;
# include "qemu/qemu_capabilities.h"
# include "viralloc.h"
+# include "virstring.h"
struct testInfo {
const char *name;
# include "internal.h"
# include "viralloc.h"
-# include "virutil.h"
# include "qemu/qemu_monitor.h"
struct testEscapeString
#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
# include "qemu/qemu_domain.h"
# include "datatypes.h"
# include "cpu/cpu_map.h"
+# include "virstring.h"
# include "testutilsqemu.h"
# include "qemu/qemu_conf.h"
# include "qemu/qemu_domain.h"
# include "testutilsqemu.h"
+# include "virstring.h"
static virQEMUDriver driver;
# 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;
#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
#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
#include "xenxs/xen_sxpr.h"
#include "testutils.h"
#include "testutilsxen.h"
+#include "virstring.h"
static virCapsPtr caps;
#include "testutils.h"
#include "storage_conf.h"
#include "testutilsqemu.h"
+#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml)
#include "datatypes.h"
#include "storage/storage_backend.h"
#include "testutilsqemu.h"
+#include "virstring.h"
const char create_tool[] = "qemu-img";
#include "testutils.h"
#include "storage_conf.h"
#include "testutilsqemu.h"
+#include "virstring.h"
static int
testCompareXMLToXMLFiles(const char *poolxml, const char *inxml,
#include "virbuffer.h"
#include "virsysinfo.h"
#include "testutils.h"
-#include "virutil.h"
#include "virfile.h"
+#include "virstring.h"
#if defined (__linux__)
#include "virrandom.h"
#include "dirname.h"
#include "virprocess.h"
+#include "virstring.h"
#if TEST_OOM_TRACE
# include <execinfo.h>
#include <signal.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#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 { \
# 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"
#include <config.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include "virhashdata.h"
#include "testutils.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virlog.h"
-
+#include "virstring.h"
#define testError(...) \
do { \
#include "testutils.h"
#include "viridentity.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include <signal.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include <signal.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include "viralloc.h"
#include "virlog.h"
#include "virfile.h"
+#include "virstring.h"
#include "rpc/virnetsocket.h"
# include "virerror.h"
# include "viralloc.h"
# include "virlog.h"
-
# include "virportallocator.h"
+# include "virstring.h"
# define VIR_FROM_THIS VIR_FROM_RPC
#include "internal.h"
#include "virxml.h"
-#include "virutil.h"
#include "testutils.h"
+#include "virstring.h"
#ifdef WIN32
#include "virerror.h"
#include "virlog.h"
#include "virstoragefile.h"
+#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include <stdlib.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include <signal.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include <signal.h>
#include "testutils.h"
-#include "virutil.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
# include "internal.h"
# include "viralloc.h"
# include "vmx/vmx.h"
+# include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;
#include "testutils.h"
#include "xen/xen_hypervisor.h"
#include "virfile.h"
+#include "virstring.h"
static int
testCompareFiles(virArch hostmachine, const char *xml_rel,
#include "testutils.h"
#include "testutilsxen.h"
#include "viralloc.h"
+#include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;
#include "xenxs/xen_sxpr.h"
#include "testutils.h"
#include "testutilsxen.h"
+#include "virstring.h"
static virCapsPtr caps;
static virDomainXMLOptionPtr xmlopt;
# include "internal.h"
# include "viralloc.h"
# include "vmx/vmx.h"
+# include "virstring.h"
static virCapsPtr caps;
static virVMXContext ctx;
# include "internal.h"
# include "console.h"
# include "virlog.h"
-# include "virutil.h"
# include "virfile.h"
# include "viralloc.h"
# include "virthread.h"
#include "virmacaddr.h"
#include "virsh-domain.h"
#include "virxml.h"
+#include "virstring.h"
static const char *
vshDomainIOErrorToString(int error)
#include "console.h"
#include "viralloc.h"
#include "vircommand.h"
-#include "virutil.h"
#include "virfile.h"
#include "virjson.h"
#include "virkeycode.h"
#include "internal.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virsh-domain.h"
#include "virxml.h"
#include "virtypedparam.h"
+#include "virstring.h"
/*
* "capabilities" command
#include "viralloc.h"
#include "virutil.h"
#include "virxml.h"
+#include "virstring.h"
virInterfacePtr
vshCommandOptInterfaceBy(vshControl *ctl, const vshCmd *cmd,
#include "internal.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virxml.h"
#include "conf/network_conf.h"
#include "internal.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virxml.h"
#include "conf/node_device_conf.h"
#include "internal.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virxml.h"
#include "conf/storage_conf.h"
+#include "virstring.h"
virStoragePoolPtr
vshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optname,
#include "internal.h"
#include "virbuffer.h"
#include "viralloc.h"
-#include "virutil.h"
#include "virsh-domain.h"
#include "virxml.h"
#include "conf/snapshot_conf.h"
#include "virfile.h"
#include "virsh-pool.h"
#include "virxml.h"
+#include "virstring.h"
virStorageVolPtr
vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
#include "base64.h"
#include "virbuffer.h"
#include "console.h"
-#include "virutil.h"
#include "viralloc.h"
#include "virxml.h"
#include <libvirt/libvirt-qemu.h>
#include "virbitmap.h"
#include "conf/domain_conf.h"
#include "virtypedparam.h"
+#include "virstring.h"
#include "virsh-domain.h"
#include "virsh-domain-monitor.h"
#include "viralloc.h"
#include "virfile.h"
#include "virt-host-validate-common.h"
+#include "virstring.h"
static bool quiet;