[PATCH 00/12] vsh: Improve completer code
by Michal Privoznik
There is no functional change to completion. No user visible change, nor
to a developer who writes a completer callback. Some code deduplication
and code cleanup and adapting code to 2021.
Michal Prívozník (12):
lib: Substitute some STREQLEN with STRPREFIX
vsh: Don't put VSH_OT_ALIAS onto list of completions
vsh: Use g_auto(GStrv) to free string list returned by completer
callback
vsh: Accept NULL @list in vshCompleterFilter()
vsh: Prefer g_strdup_printf() over g_snprintf() in
vshReadlineOptionsGenerator()
vsh: Use g_auto() for string lists returned in readline
command/options generators
vsh: Rewrite opt->type check in vshReadlineParse()
vsh: Deduplicate filtering in vshReadlineOptionsGenerator()
vsh: Deduplicate filtering in vshReadlineCommandGenerator()
vsh: Simplify condition for calling completer callback
vsh: Rework vshReadlineCommandGenerator()
vsh: Drop unused @text arg from readline generators
src/libxl/xen_xl.c | 2 +-
src/util/vircgroupv2.c | 10 +--
tools/vsh.c | 152 ++++++++++++++++-------------------------
3 files changed, 63 insertions(+), 101 deletions(-)
--
2.26.2
3 years, 10 months
[PATCH] virStorageSourceClear: Unref @vhostuser
by Michal Privoznik
The @vhostuser member of virStorageSource structure is allocated
during parsing in virDomainDiskSourceVHostUserParse() but never
freed leading to a memleak. Since the member is an object it has
to be unrefed instead of g_free()-d.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/storage_source_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c
index 7706bbd8da..67c3aedefb 100644
--- a/src/conf/storage_source_conf.c
+++ b/src/conf/storage_source_conf.c
@@ -1125,6 +1125,7 @@ virStorageSourceClear(virStorageSourcePtr def)
virStorageEncryptionFree(def->encryption);
virStoragePRDefFree(def->pr);
virStorageSourceNVMeDefFree(def->nvme);
+ virObjectUnref(def->vhostuser);
virStorageSourceSeclabelsClear(def);
virStoragePermsFree(def->perms);
VIR_FREE(def->timestamps);
--
2.26.2
3 years, 10 months
[libvirt PATCH] tests: Only mock $INODE64 symbols on x86_64 macOS
by Andrea Bolognani
The version of macOS running on Apple Silicon doesn't need to
concern itself with backwards compatibility with 32-bit
applications, and so it could jettison all the symbol aliasing
shenanigans involved.
https://gitlab.com/libvirt/libvirt/-/issues/121
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
tests/virfilewrapper.c | 2 +-
tests/virmockstathelpers.c | 4 ++--
tests/virpcimock.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c
index ca2356b5c9..1369cfb766 100644
--- a/tests/virfilewrapper.c
+++ b/tests/virfilewrapper.c
@@ -56,7 +56,7 @@ static void init_syms(void)
VIR_MOCK_REAL_INIT(access);
VIR_MOCK_REAL_INIT(mkdir);
VIR_MOCK_REAL_INIT(open);
-# ifdef __APPLE__
+# if defined(__APPLE__) && defined(__x86_64__)
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
# else
VIR_MOCK_REAL_INIT(opendir);
diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c
index 830dfe1085..9344345baa 100644
--- a/tests/virmockstathelpers.c
+++ b/tests/virmockstathelpers.c
@@ -161,7 +161,7 @@ static void virMockStatInit(void)
debug = getenv("VIR_MOCK_STAT_DEBUG");
#ifdef MOCK_STAT
-# ifdef __APPLE__
+# if defined(__APPLE__) && defined(__x86_64__)
VIR_MOCK_REAL_INIT_ALIASED(stat, "stat$INODE64");
# else
VIR_MOCK_REAL_INIT(stat);
@@ -181,7 +181,7 @@ static void virMockStatInit(void)
fdebug("real __xstat64 %p\n", real___xstat64);
#endif
#ifdef MOCK_LSTAT
-# ifdef __APPLE__
+# if defined(__APPLE__) && defined(__x86_64__)
VIR_MOCK_REAL_INIT_ALIASED(lstat, "lstat$INODE64");
# else
VIR_MOCK_REAL_INIT(lstat);
diff --git a/tests/virpcimock.c b/tests/virpcimock.c
index f6280fc8b5..d1c6220c57 100644
--- a/tests/virpcimock.c
+++ b/tests/virpcimock.c
@@ -936,7 +936,7 @@ init_syms(void)
VIR_MOCK_REAL_INIT(__open_2);
# endif /* ! __GLIBC__ */
VIR_MOCK_REAL_INIT(close);
-# ifdef __APPLE__
+# if defined(__APPLE__) && defined(__x86_64__)
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
# else
VIR_MOCK_REAL_INIT(opendir);
--
2.26.2
3 years, 10 months
tpm-tis device for ARM virt
by Jim Fehlig
Hi All,
I received a private bug report that starting a VM with swtpm device fails with
qemu-system-aarch64. The VM config has
<tpm model='tpm-tis'>
<backend type='emulator' version='2.0'/>
</tpm>
QEMU reports the following error
error: internal error: process exited while connecting to monitor:
2021-02-07T05:15:35.378927Z qemu-system-aarch64: -device
tpm-tis,tpmdev=tpm-tpm0,id=tpm0: 'tpm-tis' is not a valid device model name
Indeed it appears the device name is 'tpm-tis-device' [1][2] for ARM virt. The
similar yet different device naming between x86 and ARM is unfortunate. IIUC,
the devices are the same between the architectures, i.e. they both emulate a TPM
device conforming to the TIS spec. If so, adding a 'tpm-tis-device' to
virDomainTPMModel seems redundant. I assume the naming difference should be
handled internally, e.g. something like the below patch to qemuBuildTPMDevStr? I
can send a proper patch if this is an acceptable approach.
Regards,
Jim
[1] https://qemu.readthedocs.io/en/latest/specs/tpm.html
[2] https://github.com/qemu/qemu/commit/c294ac327ca99342b90bd3a83d2cef9b447afaa7
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 92036d26c0..5154611ccd 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9198,6 +9198,9 @@ qemuBuildTPMDevStr(const virDomainDef *def,
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
const char *model = virDomainTPMModelTypeToString(tpm->model);
+ if (tpm->model == VIR_DOMAIN_TPM_MODEL_TIS && def->os.arch == VIR_ARCH_AARCH64)
+ model = "tpm-tis-device";
+
virBufferAsprintf(&buf, "%s,tpmdev=tpm-%s,id=%s",
model, tpm->info.alias, tpm->info.alias);
3 years, 10 months
[PATCH] Rework qemuMigrationDstPrecreateDisk()
by Yi Li
'conn' vairable which are used only inside the func. Let's declare
inside the func body to make that obvious.
Use g_autofree to allow removal of 'cleanup:' and the 'ret' variable.
Signed-off-by: Yi Li <yili(a)winhong.com>
---
src/qemu/qemu_migration.c | 68 +++++++++++++++------------------------
1 file changed, 26 insertions(+), 42 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index f44d31c971..6bb0677f86 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -169,15 +169,15 @@ qemuMigrationSrcRestoreDomainState(virQEMUDriverPtr driver, virDomainObjPtr vm)
static int
-qemuMigrationDstPrecreateDisk(virConnectPtr *conn,
- virDomainDiskDefPtr disk,
+qemuMigrationDstPrecreateDisk(virDomainDiskDefPtr disk,
unsigned long long capacity)
{
- int ret = -1;
- virStoragePoolPtr pool = NULL;
- virStorageVolPtr vol = NULL;
- char *volName = NULL, *basePath = NULL;
- char *volStr = NULL;
+ g_autoptr(virConnect) conn = NULL;
+ g_autoptr(virStoragePool) pool = NULL;
+ g_autoptr(virStorageVol) vol = NULL;
+ char *volName = NULL;
+ g_autofree char *basePath = NULL;
+ g_autofree char *volStr = NULL;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
const char *format = NULL;
unsigned int flags = 0;
@@ -198,32 +198,28 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn,
virReportError(VIR_ERR_INVALID_ARG,
_("malformed disk path: %s"),
disk->src->path);
- goto cleanup;
+ return -1;
}
*volName = '\0';
volName++;
- if (!*conn) {
- if (!(*conn = virGetConnectStorage()))
- goto cleanup;
- }
+ if (!(conn = virGetConnectStorage()))
+ return -1;
- if (!(pool = virStoragePoolLookupByTargetPath(*conn, basePath)))
- goto cleanup;
+ if (!(pool = virStoragePoolLookupByTargetPath(conn, basePath)))
+ return -1;
format = virStorageFileFormatTypeToString(disk->src->format);
if (disk->src->format == VIR_STORAGE_FILE_QCOW2)
flags |= VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA;
break;
case VIR_STORAGE_TYPE_VOLUME:
- if (!*conn) {
- if (!(*conn = virGetConnectStorage()))
- goto cleanup;
- }
+ if (!(conn = virGetConnectStorage()))
+ return -1;
- if (!(pool = virStoragePoolLookupByName(*conn, disk->src->srcpool->pool)))
- goto cleanup;
+ if (!(pool = virStoragePoolLookupByName(conn, disk->src->srcpool->pool)))
+ return -1;
format = virStorageFileFormatTypeToString(disk->src->format);
volName = disk->src->srcpool->volume;
if (disk->src->format == VIR_STORAGE_FILE_QCOW2)
@@ -245,13 +241,13 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn,
_("cannot precreate storage for disk type '%s'"),
virStorageTypeToString(disk->src->type));
goto cleanup;
+ return -1;
}
if ((vol = virStorageVolLookupByName(pool, volName))) {
VIR_DEBUG("Skipping creation of already existing volume of name '%s'",
volName);
- ret = 0;
- goto cleanup;
+ return 0;
}
virBufferAddLit(&buf, "<volume>\n");
@@ -269,19 +265,13 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn,
if (!(volStr = virBufferContentAndReset(&buf))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("unable to create volume XML"));
- goto cleanup;
+ return -1;
}
if (!(vol = virStorageVolCreateXML(pool, volStr, flags)))
- goto cleanup;
+ return -1;
- ret = 0;
- cleanup:
- VIR_FREE(basePath);
- VIR_FREE(volStr);
- virObjectUnref(vol);
- virObjectUnref(pool);
- return ret;
+ return 0;
}
static bool
@@ -313,9 +303,7 @@ qemuMigrationDstPrecreateStorage(virDomainObjPtr vm,
const char **migrate_disks,
bool incremental)
{
- int ret = -1;
size_t i = 0;
- virConnectPtr conn = NULL;
if (!nbd || !nbd->ndisks)
return 0;
@@ -332,7 +320,7 @@ qemuMigrationDstPrecreateStorage(virDomainObjPtr vm,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unable to find disk by target: %s"),
nbd->disks[i].target);
- goto cleanup;
+ return -1;
}
if (disk->src->type == VIR_STORAGE_TYPE_NVME) {
@@ -352,20 +340,16 @@ qemuMigrationDstPrecreateStorage(virDomainObjPtr vm,
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("pre-creation of storage targets for incremental "
"storage migration is not supported"));
- goto cleanup;
+ return -1;
}
VIR_DEBUG("Proceeding with disk source %s", NULLSTR(diskSrcPath));
- if (qemuMigrationDstPrecreateDisk(&conn,
- disk, nbd->disks[i].capacity) < 0)
- goto cleanup;
+ if (qemuMigrationDstPrecreateDisk(disk, nbd->disks[i].capacity) < 0)
+ return -1;
}
- ret = 0;
- cleanup:
- virObjectUnref(conn);
- return ret;
+ return 0;
}
--
2.25.3
3 years, 10 months
[PATCH] build: Fix generation of virtproxyd socket files
by Jim Fehlig
The various virtproxyd socket files are generated with invalid syntax,
e.g. from virtproxyd.socket
[Unit]
Description=Libvirt proxy local socket
Before=virtproxyd.service
libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket
Note the missing 'Conflicts=' in the last line. Fix it by prepending
'Conflicts=' to libvirtd_socket_conflicts when adding virtproxyd
to virt_daemon_units.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/remote/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/meson.build b/src/remote/meson.build
index 9ad2f6ab1c..0a188268b5 100644
--- a/src/remote/meson.build
+++ b/src/remote/meson.build
@@ -230,7 +230,7 @@ if conf.has('WITH_REMOTE')
'name': 'Libvirt proxy',
'sockprefix': 'libvirt',
'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ],
- 'deps': libvirtd_socket_conflicts,
+ 'deps': 'Conflicts=' + libvirtd_socket_conflicts,
}
openrc_init_files += {
--
2.29.2
3 years, 10 months
generation of virtproxd socket files
by Jim Fehlig
Hi All,
I received a report [1] and verified that virtproxyd*.socket files have broken
syntax. E.g. from virtproxyd.socket
[Unit]
Description=Libvirt proxy local socket
Before=virtproxyd.service
libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tcp.socket
libvirtd-tls.socket
virtproxyd.socket should 'Conflicts' with the libvirtd sockets. I suspect this
regressed in the switch to meson. I checked a libvirt 6.0.0 installation and
indeed it has
Conflicts=libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
libvirtd-tcp.socket libvirtd-tls.socket
I blame it on Monday and my mind stuck in the weekend, but I spent too much time
trying to figure out how those socket files are generated before writing this
mail. It would be much appreciated if someone can give me a nudge in the right
direction :-).
Regards,
Jim
[1] https://bugzilla.opensuse.org/show_bug.cgi?id=1181838
3 years, 10 months
[PATCH 0/2] Fix two memleaks in virQEMUCapsLoadMachines()
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
qemu_capabilities: Don't leak @str in virQEMUCapsLoadMachines()
qemu_capabilities: Parse "deprecated" in virQEMUCapsLoadMachines()
properly
src/qemu/qemu_capabilities.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--
2.26.2
3 years, 10 months
[libvirt PATCH 0/9] fix cgroups on systemd hosts
by Pavel Hrdina
When running on host with systemd there is an ownership issue of
the root VM cgroup. When it is created for us by systemd using machined
the owner of the root VM cgroup is systemd and we should not touch any
of the files as systemd can and will modify any values configured there.
Basically we had the issue since introduction of machined support
in libvirt 1.1.1 back in 2013. With systemd implementing more cgroup
APIs the `systemctl daemon-reload` would change more values configured
by libvirt.
The solution to the issue is to use systemd DBus APIs to configure
cgroups but unfortunately they don't cover everything that libvirt
needs.
For that reason we will use systemd DBus APIs only for values that
affect sibling cgroups where the resources are distributed
proportionally, such as blkio.weight or cpu.shares. For the remaining
resources we will keep the current code where we work with the files
directly but we move everything into a child cgroup of the VM root
cgroup where we are free to do whatever we like including thread
configuration.
Pavel Hrdina (9):
virsystemd: export virSystemdHasMachined
virsystemd: introduce virSystemdGetMachineByPID
virsystemd: introduce virSystemdGetMachineUnitByPID
vircgroup: use DBus call to systemd for some APIs
vircgroupv1: refactor virCgroupV1DetectPlacement
vircgroupv2: move task into cgroup before enabling controllers
vircgroup: introduce virCgroupV1Exists and virCgroupV2Exists
vircgroup: introduce nested cgroup to properly work with systemd
tests: add cgroup nested tests
docs/cgroups.html.in | 29 +-
src/libvirt_private.syms | 2 +
src/util/vircgroup.c | 300 ++++++++++++++----
src/util/vircgroupbackend.h | 5 +
src/util/vircgrouppriv.h | 10 +
src/util/vircgroupv1.c | 122 +++++--
src/util/vircgroupv2.c | 82 ++++-
src/util/virsystemd.c | 105 +++++-
src/util/virsystemd.h | 4 +
tests/vircgroupdata/systemd-legacy.cgroups | 12 +
tests/vircgroupdata/systemd-legacy.mounts | 11 +
.../vircgroupdata/systemd-legacy.self.cgroup | 11 +
tests/vircgroupdata/systemd-unified.cgroups | 13 +
tests/vircgroupdata/systemd-unified.mounts | 1 +
.../vircgroupdata/systemd-unified.self.cgroup | 1 +
tests/vircgrouptest.c | 72 +++++
tests/virsystemdtest.c | 39 ++-
17 files changed, 687 insertions(+), 132 deletions(-)
create mode 100644 tests/vircgroupdata/systemd-legacy.cgroups
create mode 100644 tests/vircgroupdata/systemd-legacy.mounts
create mode 100644 tests/vircgroupdata/systemd-legacy.self.cgroup
create mode 100644 tests/vircgroupdata/systemd-unified.cgroups
create mode 100644 tests/vircgroupdata/systemd-unified.mounts
create mode 100644 tests/vircgroupdata/systemd-unified.self.cgroup
--
2.29.2
3 years, 10 months
[PATCH 00/40] Replace various string helpers (and fixes for surrounding code)
by Peter Krempa
This series mainly focuses on removal of virStringListAdd which tries
to promote the use of a string list without counter variable as a
dynamic array. This means that every operation counts the number of
elements and when used in a loop resutls in O(n^2) algorithms.
To discourage it's future buggy use remove the helpers completely.
The end of the series then replaces some libvirt helpers for string
lists by the glib equivalents.
Patches:
1-3,18,24-25,28: cleanups
4-6: fix buggy iteration and memory handling in qemuNamespaceUnlinkPaths
7: helpers for easy use of GSList + char *
8-17,19-20: Don't use virStringListAdd inside of loops and prepare for
removal
21: Remove virStringListAdd and virStringListRemove
22-23: Open-code and remove virStringListGetFirstWithPrefix
26-27: Replace virStringListHasString by g_strv_contains
29-34: Preparation and removal of virStringListLength
(mostly inefficient iteration)
35-37,40: Replace/reimplement virStringSplit(Count) by g_strsplit
38-39: Replace virStringListJoin by g_strjoinv
Peter Krempa (40):
qemuMonitorJSONObjectProperty: Make 'str' member const
util: virmacmap: Use g_autofree for virJSONValue
util: macmap: Remove unused cleanup labels and 'ret' variables
qemuDomainGetPreservedMounts: Refactor to return NULL-terminated
string lists
qemuNamespaceUnlinkPaths: Fix wrong use of iterator variable
qemuNamespaceUnlinkPaths: Fix inconsistent cleanup handling
util: Add helpers for auto-freeing GSList filled with strings
qemu: namespace: Don't use 'virStringListAdd' inside loops
virHookCall: Don't use 'virStringListAdd' to construct list in loop
qemuInteropFetchConfigs: Don't use 'virStringListAdd' to construct
list
virCPUDefCheckFeatures: Don't use 'virStringListAdd' to construct list
x86ModelParseFeatures: Don't construct list using 'virStringListAdd'
virResctrlInfoGetMonitorPrefix: Don't use 'virStringListAdd' to
construct list
virResctrlMonitorGetStats: Don't use 'virStringListAdd'
qemu: Convert 'priv->dbusVMStateIds' to a GSList
util: macmap: Convert to use GSList for storing macs instead of string
lists
xenParseXLNamespaceData: Pre-calculate the length of array
virfirewalltest: Shuffle the code around to remove a loop
virfirewalltest: Avoid use of 'virStringListAdd'
qemusecuritytest: Store 'notRestored' files in a hash table
util: virstring: Remove virStringListAdd and virStringListRemove
virCgroupGetValueForBlkDev: Rewrite lookup of returned string
virStringListGetFirstWithPrefix: Remove unused helper
vz: Replace virStringSplitCount(, , , NULL) with virStringSplit
qemuProcessUpdateDevices: Refactor cleanup and memory handling
Replace virStringListHasString by g_strv_contains
util: virstring: Remove virStringListHasString
virStorageBackendSheepdogAddVolume: Clean up memory handling
qemufirmwaretest: Base iteration on string lists
qemuvhostusertest: Base iteration on string lists
Replace virStringListLength where actual lenght is not needed
virPolkitCheckAuth: Avoid virStringListLength in loop condition
Replace virStringListLength by g_strv_length
util: virstring: Remove virStringListLength
Replace virStringSplit with g_strsplit
util: virstring: Remove virStringSplit
virStringSplitCount: Reimplement using g_strsplit and g_strv_length
Replace virStringListJoin by g_strjoinv
util: virstring: Remove virStringListJoin
virstringtest: Remove testing of virStringSplitCount
src/bhyve/bhyve_command.c | 2 +-
src/bhyve/bhyve_parse_command.c | 4 +-
src/conf/cpu_conf.c | 14 +-
src/conf/storage_conf.c | 2 +-
src/cpu/cpu_arm.c | 2 +-
src/cpu/cpu_x86.c | 8 +-
src/libvirt_private.syms | 11 +-
src/libxl/libxl_conf.c | 8 +-
src/libxl/xen_common.c | 8 +-
src/libxl/xen_xl.c | 49 +--
src/lxc/lxc_native.c | 14 +-
src/qemu/qemu_capabilities.c | 8 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_conf.c | 4 +-
src/qemu/qemu_dbus.c | 19 +-
src/qemu/qemu_dbus.h | 2 +-
src/qemu/qemu_domain.c | 4 +-
src/qemu/qemu_domain.h | 2 +-
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_firmware.c | 5 +-
src/qemu/qemu_interop_config.c | 13 +-
src/qemu/qemu_migration.c | 10 +-
src/qemu/qemu_monitor.c | 19 +-
src/qemu/qemu_monitor.h | 2 +-
src/qemu/qemu_monitor_json.c | 5 +-
src/qemu/qemu_monitor_json.h | 4 +-
src/qemu/qemu_namespace.c | 283 +++++++++---------
src/qemu/qemu_process.c | 37 +--
src/qemu/qemu_qapi.c | 2 +-
src/qemu/qemu_slirp.c | 7 +-
src/qemu/qemu_vhost_user.c | 4 +-
src/rpc/virnetsocket.c | 4 +-
src/storage/storage_backend_sheepdog.c | 15 +-
src/storage/storage_backend_zfs.c | 6 +-
.../storage_source_backingstore.c | 8 +-
src/util/meson.build | 1 +
src/util/vircgroup.c | 26 +-
src/util/vircgroupv2.c | 2 +-
src/util/vircommand.c | 2 +-
src/util/virdevmapper.c | 2 +-
src/util/virfile.c | 2 +-
src/util/virfirewall.c | 2 +-
src/util/virfirmware.c | 4 +-
src/util/virglibutil.c | 27 ++
src/util/virglibutil.h | 28 ++
src/util/virhook.c | 15 +-
src/util/virmacmap.c | 175 ++++++-----
src/util/virmacmap.h | 6 +-
src/util/virpolkit.c | 13 +-
src/util/virprocess.c | 5 +-
src/util/virresctrl.c | 17 +-
src/util/virstring.c | 226 +-------------
src/util/virstring.h | 24 +-
src/vz/vz_sdk.c | 2 +-
tests/qemufirmwaretest.c | 24 +-
tests/qemumonitorjsontest.c | 6 +-
tests/qemusecuritymock.c | 19 +-
tests/qemusecuritytest.c | 14 +-
tests/qemusecuritytest.h | 4 +-
tests/qemuvhostusertest.c | 24 +-
tests/qemuxml2argvtest.c | 2 +-
tests/vboxsnapshotxmltest.c | 2 +-
tests/virconftest.c | 4 +-
tests/virfirewalltest.c | 30 +-
tests/virmacmaptest.c | 21 +-
tests/virstringtest.c | 211 +------------
tools/virsh-completer.c | 7 +-
tools/virsh-domain.c | 14 +-
tools/virsh-host.c | 4 +-
tools/virt-login-shell-helper.c | 2 +-
tools/vsh.c | 2 +-
71 files changed, 595 insertions(+), 965 deletions(-)
create mode 100644 src/util/virglibutil.c
create mode 100644 src/util/virglibutil.h
--
2.29.2
3 years, 10 months