On 4/16/21 2:25 AM, Peter Krempa wrote:
On Thu, Apr 15, 2021 at 17:08:26 +0200, Tim Wiederhake wrote:
Fixes: b523e22521a
Signed-off-by: Tim Wiederhake
---
src/libxl/xen_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index 12a442
Future patch will remove MKFS define as we will no longer check it
during compilation.
Signed-off-by: Pavel Hrdina
---
src/storage/storage_backend_fs.c | 24 +---
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/storage/storage_backend_fs.c b/src/storage/sto
Drop code that creates defines with program paths and update the comment
to reflect current usage of optional_programs.
Signed-off-by: Pavel Hrdina
---
meson.build | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index 1c27dd030e..7e377fab9c
Extend virFindFileInPath to search in custom extra paths as well. Some
binaries that libvirt needs are not usually in $PATH so we need to have
a way to look for these as well.
Signed-off-by: Pavel Hrdina
---
src/libvirt_private.syms | 2 +-
src/util/virfile.c | 16 ++--
src/ut
These binaries are used only during runtime so technically there is no
need to check for them while compiling libvirt.
Usually the location is the same while compiling and running but it may
not be true. In addition they are not strictly required to compile the
code so this way developers don't ha
Upstream sheepdog changed collie to dog back in 2013 in version 0.7.0.
Looking into repology that version is no longer used by any distribution
supported by libvirt.
Signed-off-by: Pavel Hrdina
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meso
The function in question uses "tc" binary so virnetdevbandwidth feels
like better place for it.
Signed-off-by: Pavel Hrdina
---
src/libvirt_private.syms | 2 +-
src/qemu/qemu_domain.c| 3 ++-
src/util/virnetdev.c | 46
src/util/virnetdev.h
We always pass DNSMASQ so there is no need for the argument at all.
Signed-off-by: Pavel Hrdina
---
src/network/bridge_driver.c | 4 ++--
src/util/virdnsmasq.c | 4 ++--
src/util/virdnsmasq.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/network/bridge_dr
This will allow us to run tests using firewall on hosts where the mocked
binaries are not available/installed instead of skipping these tests.
Signed-off-by: Pavel Hrdina
---
src/util/virfile.h | 3 ++-
tests/meson.build | 1 +
tests/virfirewallmock.c | 34 ++
Following patches will stop detecting the full path during compilation
so we will need to do it here.
Signed-off-by: Pavel Hrdina
---
src/qemu/qemu_conf.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 916
Currently the tests would fail if the bhyve commands are installed in
different path then /usr/bin. Strip the command path to not depend on
the host environment.
Signed-off-by: Pavel Hrdina
---
tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args | 2 +-
tests/bhyvexml2argvdata/bhyvexml
Having the function on mock library reflect more closely what we usually
do in tests.
Signed-off-by: Pavel Hrdina
---
tests/domaincapsmock.c | 16
tests/testutilsqemu.c | 15 ---
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/tests/domaincapsmock.c
Following patches will make this change necessary as we will stop
detecting the full path during compile time.
Signed-off-by: Pavel Hrdina
---
src/util/virfirewall.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index 78aa7
Instead of removing binaryPath let's drop the function completely as
it is not used anywhere.
Signed-off-by: Pavel Hrdina
---
src/libvirt_private.syms | 1 -
src/util/virdnsmasq.c| 30 --
src/util/virdnsmasq.h| 2 --
3 files changed, 33 deletions(-)
diff --
We always pass DNSMASQ so there is no need for the argument at all.
Signed-off-by: Pavel Hrdina
---
src/util/virdnsmasq.c | 4 ++--
src/util/virdnsmasq.h | 3 +--
tests/networkxml2conftest.c | 6 +++---
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/util/virdnsmas
Instead of checking for specific error that the binaries are not
available mock the virFindFileInPath function. This way we don't have
to skip these tests on host where the binaries are missing.
Signed-off-by: Pavel Hrdina
---
tests/networkxml2firewalltest.c | 16 ++--
tests/nwfilte
Instead of removing binaryPath let's drop the function completely as
it is not used anywhere.
Signed-off-by: Pavel Hrdina
---
src/libvirt_private.syms | 1 -
src/util/virdnsmasq.c| 17 -
src/util/virdnsmasq.h| 1 -
3 files changed, 19 deletions(-)
diff --git a/src/libv
Recent attempt to add a lot of meson options to specify different
runtime paths motivated me enough to cleanup this from meson.
Pavel Hrdina (17):
bridge_driver: fix comment about dnsmasqCaps
virdnsmasq: drop unused dnsmasqCapsNewFromFile function
virdnsmasq: drop unused dnsmasqCapsR
We will never call dnsmasqCapsRefresh() so reflect what actually
happens.
Signed-off-by: Pavel Hrdina
---
src/network/bridge_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 1172dbbc18..706a557ee8 100644
On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
From: Erik Skultety
Now that we have a generic mdevctl command generator, we can unify the
test infrastructure as well.
Signed-off-by: Erik Skultety
Reviewed-by: Laine Stump
On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
From: Erik Skultety
Currently there are dedicated wrappers to construct mdevctl command.
These are mostly fine except for the one that translates both "start"
and "define" commands, only because mdevctl takes the same set of
arguments. Instead, keep t
On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
These per-command generator functions were only exposed in the header to
allow the commandline generation to be tested. Now that we have a
generic mdevctl command generator, we can get rid of the per-command
wrappers and reduce the noise in the header.
On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
From: Erik Skultety
"start" in libvirt means - "take this object and create an
instance out of it"
"create" in libvirt most of the time means - "take and XML description,
make an object out of it and use it to create an instance"
This gets confusing
On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
Rather than specifying a UUID string to some test macros, just pass a
filename to an xml definition. This helps work toward unifying the test
macros and making it more maintainable.
Signed-off-by: Jonathon Jongsma
Reviewed-by: Laine Stump
Use the new macro instead of virXMLParseStringCtxt in places where the
root node is being validated.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 9 +
src/conf/storage_conf.c | 16 +---
src/util/virxml.h | 4
3 files changed, 10 insertions(+), 19 del
Unfortunately virDomainSnapshotLocation is declared in snapshot_conf.h
which includes domain_conf.h. To avoid a circular dependency use
'unsigned int' for now.
Use XML parser can use virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 15 +++
src/conf/domain_con
Move the rest of the validations to the vaidation code.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 44 --
src/conf/domain_validate.c | 44 ++
2 files changed, 44 insertions(+), 44 deletions(-)
diff --git a
Modifications of the data such as this one don't belong into the parser.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ce0931c160..2803055204 10064
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 12
src/conf/domain_validate.c | 37 +++--
2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c8c0476a42..0738bf7f1f 100644
Unify the two distinct disk definition validators.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 143 +
src/conf/domain_validate.c | 125
src/conf/domain_validate.h | 2 +
3 files changed, 128 insertions(+), 14
Separate the validation of the source so that it can be reused once we
split up the XML parser too.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 82 +++---
1 file changed, 46 insertions(+), 36 deletions(-)
diff --git a/src/conf/domain_conf.c b/src
Use the new virXMLProp helpers and XPath queries to get rid of the old
style of iteration through element children.
Note that in case of def->blockio.logical_block_size,
def->blockio.physical_block_size and def->rotation_rate the wraparound
behaviour of 'virStrToLong_ui' was _not_ forward ported t
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Changes to other places using switch statements were required.
Signed-off-by: Peter Krempa
---
src/bhyve/bhyve_command.c | 3 +++
src/conf/domain_conf.c | 9 ++---
src/co
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Changes to other places using switch statements were required.
Signed-off-by: Peter Krempa
---
src/bhyve/bhyve_command.c | 9 +
src/bhyve/bhyve_domain.c | 12 +++
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 13 +++--
src/conf/domain_conf.h | 2 +-
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/conf/do
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 8 ++--
src/conf/domain_conf.h | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/conf/domain_con
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 14 +++---
src/conf/domain_conf.h | 2 +-
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/conf/d
Move the setting of read-only state, the default disk bus and setting of
'snapshot' state for read-only disks to the post parse callback to clean
up the disk parser.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 50 +++---
1 file changed, 27 inserti
Mark it explicitly as read only in accordance with the comment outlining
configuration.
Signed-off-by: Peter Krempa
---
src/vmx/vmx.c| 3 +++
tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 1 +
tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xm
Consolidate the checks for '' and viritio queues under
already existing blocks which have the same condition.
Signed-off-by: Peter Krempa
---
src/conf/domain_validate.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/conf/domain_validate.c b/s
There's no code which would assert it at this point. Remove the flag.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 47 --
src/conf/domain_conf.h | 14 ++---
2 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/src/conf/domai
Extract all code related to parsing data which ends up in the 'src'
member of a virDomainDiskDef.
This allows to use the new function directly in
virDomainDiskDefParseSource and removes the use of the
VIR_DOMAIN_DEF_PARSE_DISK_SOURCE parser flag.
Signed-off-by: Peter Krempa
---
src/conf/domain_
The XML element parser is going to be modified so that the
virStorageSource bits are pre-parsed. Add virDomainDiskDefNewSource,
which uses an existing 'src' pointer.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 29 ++---
1 file changed, 18 insertions(+), 11 d
Add a helper function which will parse the source portion of a .
The idea is to replace *virDomainDiskDefParse with
VIR_DOMAIN_DEF_PARSE_DISK_SOURCE with the new helper in the future.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 30 ++
src/conf/domain_c
Split out all default setting and validation code into appropriate
functions and convert the XML parser to contemporary helpers.
Peter Krempa (25):
virXMLParseHelper: Add root XML node name validation capability
util: xml: Introduce virXMLParseStringCtxtRoot
conf: domain: Introduce virDomain
The moved code contains only checks and does not modify the parsed
document so it doesn't belong into the PostParse code.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 19 ---
src/conf/domain_validate.c | 18 ++
2 files changed, 18 insertions(+), 19
qemuDomainBlockCopy needs just the source portion of the disk but uses
the disk parser for it. Since we have a specific function now, refactor
the code to avoid having to deal with the unused virDomainDiskDef.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 9 ++---
1 file changed,
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 15 +--
src/conf/domain_conf.h | 2 +-
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/conf/
Add a disk bus value represending no selected bus. This will help split
up the XML parser.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 1 +
src/conf/domain_validate.c | 1 +
src/qemu/qemu_alias.c | 1 +
src/qemu/qemu_comma
Some callers want to validate the root XML node name. Add the capability
to the parser helper to prevent open-coding.
Signed-off-by: Peter Krempa
---
src/util/virxml.c | 18 --
src/util/virxml.h | 13 +++--
2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/s
On Thu, Apr 15, 2021 at 11:20:14AM +0200, Andrea Bolognani wrote:
> The former is ridiculously tiny and doesn't have any use on
> its own, so it hardly warrants the overhead of an additional
> package; the latter is also very small and, just like virsh,
> is something that you likely want to have a
On 3/31/21 8:55 PM, Ján Tomko wrote:
Allow passing a socket of an externally launched virtiofsd
to the vhost-user-fs device.
https://bugzilla.redhat.com/show_bug.cgi?id=1855789
Signed-off-by: Ján Tomko
---
docs/schemas/domaincommon.rng | 11 ++
src/conf/domain
On 3/31/21 8:55 PM, Ján Tomko wrote:
Connect the vhost-user-fs device to a socket path configured in the XML.
Starting and stopping the virtiofsd daemon on that socket is the user's
responsibility.
Ján Tomko (4):
conf: fs: fill out accessmode in post-parse
conf: fs: allow missing accessmo
Sorry for not putting you in Cc on the original patch, I was too much in
a rush. If this works and looks OK to you, then let me know. Thanks.
On Fri, Apr 16, 2021 at 02:42:23PM +0200, Martin Kletzander wrote:
Resent patches with some fixes
v5: https://listman.redhat.com/archives/libvir-list/2
From: Luyao Zhong
Reviewed-by: Daniel Henrique Barboza
Signed-off-by: Luyao Zhong
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_command.c | 5 ++-
src/qemu/qemu_process.c | 32
...emnode-restrictive-mode.x86_64-latest.args | 3
From: Luyao Zhong
This allows users to restrict memory nodes without setting any specific
memory policy, then 'restrictive' mode is useful.
Reviewed-by: Daniel Henrique Barboza
Signed-off-by: Luyao Zhong
Signed-off-by: Martin Kletzander
---
docs/formatdomain.rst | 7
Resent patches with some fixes
v5: https://listman.redhat.com/archives/libvir-list/2021-April/msg00450.html
Luyao Zhong (2):
conf, docs, schema: Add support for 'restrictive' mode in numatune
qemu: Add support for 'restrictive' mode in numatune
docs/formatdomain.rst
On Fri, Apr 16, 2021 at 14:22:32 +0200, Tim Wiederhake wrote:
> On Fri, 2021-04-16 at 13:50 +0200, Peter Krempa wrote:
> > I was testing how virXMLPropEnum works when used on converted types,
> > so
> > I've converted these.
> >
> > Peter Krempa (2):
> > conf: domain: Convert virDomainDiskDef's
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 26 ++
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 1ce31e9234..a2893fec6f 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@
On Fri, 2021-04-16 at 13:50 +0200, Peter Krempa wrote:
> I was testing how virXMLPropEnum works when used on converted types,
> so
> I've converted these.
>
> Peter Krempa (2):
> conf: domain: Convert virDomainDiskDef's 'tray_status' to
> virDomainDiskTray
> conf: domain: Convert virDomain
Signed-off-by: Tim Wiederhake
---
src/conf/backup_conf.c | 17 +++--
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c
index 859609946f..898725aac7 100644
--- a/src/conf/backup_conf.c
+++ b/src/conf/backup_conf.c
@@ -222,8 +
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 33 +++--
1 file changed, 11 insertions(+), 22 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 6a4b14cfda..8d3d012e4a 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_c
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 25 ++---
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 5a98cd8c0f..587f966398 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 47 +++---
1 file changed, 12 insertions(+), 35 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 8d3d012e4a..951b7a348e 100644
--- a/src/conf/device_conf.c
+++ b/src/conf
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index f7bf2de6f1..1ce31e9234 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -403,19 +403,16 @@
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 51 +-
1 file changed, 21 insertions(+), 30 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 951b7a348e..621ff1b476 100644
--- a/src/conf/device_conf.c
+++ b/src/conf
For background, see
https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html
Tim Wiederhake (10):
virDomainBackupDiskDefParseXML: Use virXMLProp*
virDomainBackupDefParse: Use virXMLProp*
virZPCIDeviceAddressParseXML: Use virXMLProp*
virPCIDeviceAddressParseXML: Use virXMLPr
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 587f966398..f7bf2de6f1 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -362,24
Signed-off-by: Tim Wiederhake
---
src/conf/device_conf.c | 33 -
1 file changed, 8 insertions(+), 25 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 621ff1b476..5a98cd8c0f 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_co
Signed-off-by: Tim Wiederhake
---
src/conf/backup_conf.c | 40 ++--
1 file changed, 10 insertions(+), 30 deletions(-)
diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c
index 2de77a59c0..859609946f 100644
--- a/src/conf/backup_conf.c
+++ b/src/conf/b
On a Tuesday in 2021, Erik Skultety wrote:
Coverity report:
1193g_autofree char *vfiogroup =
1194virMediatedDeviceGetIOMMUGroupDev(def->caps->data.mdev.uuid);
>>> CID 317619: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "NULL" "vfio
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 13 +++--
src/conf/domain_conf.h | 2 +-
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/conf/do
I was testing how virXMLPropEnum works when used on converted types, so
I've converted these.
Peter Krempa (2):
conf: domain: Convert virDomainDiskDef's 'tray_status' to
virDomainDiskTray
conf: domain: Convert virDomainDiskDef's 'startupPolicy' to
virDomainStartupPolicy
src/conf/doma
On Fri, Apr 16, 2021 at 11:41:44 +0200, Tim Wiederhake wrote:
[...]
> Tim Wiederhake (8):
> virxml: Add virXMLPropTristateBool
> virxml: Add virXMLPropTristateSwitch
> virxml: Add virXMLPropInt
> virxml: Add virXMLPropUInt
> virxml: Add virXMLPropEnum
I've rebased these on top of the v
Use the appropriate type for the variable and refactor the XML parser to
parse it correctly using virXMLPropEnum.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 18 --
src/conf/domain_conf.h | 2 +-
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/co
On Fri, 2021-04-16 at 10:07 +0200, Peter Krempa wrote:
> Peter Krempa (5):
> util: virxml: Fix formatting of virxml.h
> virXMLParseHelper: Sync argument names between declaration and
> definition
> util: xml: Register autoptr cleanup function for 'xmlParserCtxt'
> virXMLParseHelper: Rew
On Tue, Apr 13, 2021 at 02:38:05PM +0800, Luyao Zhong wrote:
Before this patch set, numatune only has three memory modes:
static, interleave and prefered. These memory policies are
ultimately set by mbind() system call.
Memory policy could be 'hard coded' into the kernel, but none of
above polic
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/conf/domain_conf.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a0fb7731d9..858ef5db9d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/d
Convenience function to return the value of an unsigned integer XML attribute.
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virxml.c| 60
src/util/virxml.h| 8 ++
3 files chang
Convenience function to return the value of an on / off XML attribute.
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virxml.c| 44
src/util/virxml.h| 6 ++
3 files changed, 51 i
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/conf/network_conf.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index f0f5ef6f42..17835ac8d3 100644
--- a/src/conf/network_conf.c
+++ b/src/
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/conf/cpu_conf.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index c095ab0e89..c7bea8ae00 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@
Convenience function to return the value of an enum XML attribute.
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virxml.c| 48
src/util/virxml.h| 8 +++
3 files changed, 57 inse
Convenience function to return the value of an integer XML attribute.
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virxml.c| 53
src/util/virxml.h| 8 ++
3 files changed, 62 in
This series lays the groundwork for replacing some recurring boilerplate code
in src/conf/ regarding the extraction of XML attribute values.
For an on / off attribute, the boilerplate code looks roughly like this,
g_autofree char *str = NULL;
if (str = virXMLPropString(node, "x")) {
int v
Convenience function to return the value of a yes / no XML attribute.
Signed-off-by: Tim Wiederhake
Reviewed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virxml.c| 44
src/util/virxml.h| 12 +++
3 files changed,
On Thu, Apr 08, 2021 at 13:19:51 +0200, Tim Wiederhake wrote:
> Convenience function to return the value of a yes / no XML attribute.
>
> Signed-off-by: Tim Wiederhake
> ---
> src/libvirt_private.syms | 1 +
> src/util/virxml.c| 49
> src/util/vi
On Thu, Apr 15, 2021 at 17:08:28 +0200, Tim Wiederhake wrote:
> virQEMUCapsSetHostModel is called by virQEMUCapsInitHostCPUModel,
> which in turn is typically called twice (for KVM and QEMU), e.g. in
> virQEMUCapsLoadCache and virQEMUCapsNewForBinaryInternal.
>
> The second call leaks memory point
On Thu, Apr 15, 2021 at 17:08:26 +0200, Tim Wiederhake wrote:
Fixes: b523e22521a
> Signed-off-by: Tim Wiederhake
> ---
> src/libxl/xen_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
> index 12a44280cb..ad5a3de116 100644
> --- a
On Thu, Apr 15, 2021 at 17:08:27 +0200, Tim Wiederhake wrote:
Fixes: 94013ee04e3
> Signed-off-by: Tim Wiederhake
> ---
> src/conf/domain_conf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Peter Krempa
Signed-off-by: Peter Krempa
---
src/util/virxml.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index fce1c28e89..b1feeeb164 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -283,6 +283,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(xmlDoc, xmlFreeDoc);
G
Switch @xml and @pctxt to g_autofree and get rid of the "error" and
"cleanup" labels.
Signed-off-by: Peter Krempa
---
src/util/virxml.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/util/virxml.c b/src/util/virxml.c
index 029b3d646e..58d640546f 1
Move the reporting of parsing error on the error path of the parser as
other code paths report their own errors already.
Additionally prefer printing the 'url' as document name if provided
instead of "[inline data]" as that usually gives a better hint at least
which kind of XML is being parsed.
S
Signed-off-by: Peter Krempa
---
src/util/virxml.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index 84fa4f4baf..fce1c28e89 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -101,7 +101,7 @@ virXMLParseHelper(int domcode,
Peter Krempa (5):
util: virxml: Fix formatting of virxml.h
virXMLParseHelper: Sync argument names between declaration and
definition
util: xml: Register autoptr cleanup function for 'xmlParserCtxt'
virXMLParseHelper: Rework error reporting
virXMLParseHelper: Refactor cleanup
src/uti
Remove the "block" formatting of function declarations and use uniform
spacing.
Signed-off-by: Peter Krempa
---
src/util/virxml.h | 192 +++---
1 file changed, 112 insertions(+), 80 deletions(-)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index de1
On Thu, Apr 08, 2021 at 13:19:58 +0200, Tim Wiederhake wrote:
> Signed-off-by: Tim Wiederhake
> ---
> src/conf/cpu_conf.c | 14 +++---
> 1 file changed, 3 insertions(+), 11 deletions(-)
Reviewed-by: Peter Krempa
On Thu, Apr 08, 2021 at 13:19:57 +0200, Tim Wiederhake wrote:
> Signed-off-by: Tim Wiederhake
> ---
> src/conf/domain_conf.c | 14 +++---
> 1 file changed, 3 insertions(+), 11 deletions(-)
Reviewed-by: Peter Krempa
On Thu, Apr 08, 2021 at 13:19:56 +0200, Tim Wiederhake wrote:
> Signed-off-by: Tim Wiederhake
> ---
> src/conf/network_conf.c | 16 +++-
> 1 file changed, 3 insertions(+), 13 deletions(-)
Reviewed-by: Peter Krempa
On Thu, Apr 08, 2021 at 13:19:55 +0200, Tim Wiederhake wrote:
> Convenience function to return the value of an enum XML attribute.
>
> Signed-off-by: Tim Wiederhake
> ---
> src/libvirt_private.syms | 1 +
> src/util/virxml.c| 51
> src/util/virxm
1 - 100 of 107 matches
Mail list logo