On a Thursday in 2021, Peter Krempa wrote:
Use the modern style and fix all offenders since new functions were
already using the contemporary style.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.h | 957 ---
1 file changed, 551 insertions(+), 406 dele
On Thu, Dec 09, 2021 at 16:24:04 +, Daniel P. Berrangé wrote:
> On Thu, Dec 09, 2021 at 09:36:03AM +0100, Peter Krempa wrote:
> > On Wed, Dec 08, 2021 at 18:44:31 +, Daniel P. Berrangé wrote:
> > > We're only returning the set of fields needed to perform an
> > > attestation, per the SEV AP
Use the modern style and fix all offenders since new functions were
already using the contemporary style.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.h | 957 ---
1 file changed, 551 insertions(+), 406 deletions(-)
diff --git a/src/qemu/qemu_monito
On Thu, Dec 09, 2021 at 09:36:03AM +0100, Peter Krempa wrote:
> On Wed, Dec 08, 2021 at 18:44:31 +, Daniel P. Berrangé wrote:
> > We're only returning the set of fields needed to perform an
> > attestation, per the SEV API docs.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
> > src/qemu/
We already allow users to provide TFTP root path in network XML
and not specify any DHCP. This makes sense, because dnsmasq is
not only DHCP server but also TFTP server and users might have
a DHCP server configured on their own, outside of libvirt's
control and want just the TFTP part.
By moving T
Generating configuration file for dnsmasq is done in
networkDnsmasqConfContents() which is this big, self-contained
function. Separate at least DHCP part into its own function for
better readability.
Signed-off-by: Michal Privoznik
---
src/network/bridge_driver.c | 227 +++---
In networkDnsmasqConfContents() there's a for() loop which
initializes some variables in its initialization block. This
makes both the loop() statement and variable declaration block
look needlessly ugly. Speaking of variable declaration, also move
some variables which are used only within blocks i
See 3/3 for explanation.
Michal Prívozník (3):
network: Initialize variables in networkDnsmasqConfContents()
network: Separate DHCP config generator into a function
network: Generate TFTP config regardless of DHCP
src/network/bridge_driver.c | 262 ++
.../
The internals/eventloop document uses two images for
illustrative purposes, but unlike other graphics included
in the documentation these are not part of libvirt.git but
rather were added to libvirt-media.git with
commit fae5622074cf5e18d190496f8a43260c614599b2
Author: Michal Privoznik
Date
On a Thursday in 2021, Peter Krempa wrote:
In this part I'm cleaning up the command line generators and unifying
them. Until now there were multiple custom -chardev generators in places
where it was simpler to use it than the common code. This series fixes
the common code to have sane API and ref
This reverts commit 69977ff10560a80bcf5bf93f1a3f819a2d1623ca.
After previous commit it's no longer possible that QEMU driver is
not initialized in qemuStateShutdownPrepare() nor
qemuStateShutdownWait().
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_driver.c | 6 --
1 file changed, 6 del
The initialization of drivers happens in a separate thread.
However, the main thread continues initialization and sets
shutdown callbacks (virStateShutdownPrepare() and
virStateShutdownWait()) even though the driver init thread is
still running. This is dangerous because if the daemon decides to
qu
*** BLURB HERE ***
Michal Prívozník (2):
remote_daemon: Set shutdown callbacks only after init is done
Revert "qemu: Avoid crash in qemuStateShutdownPrepare() and
qemuStateShutdownWait()"
src/qemu/qemu_driver.c | 6 --
src/remote/remote_daemon.c | 7 ---
2 files changed, 4 in
On a Thursday in 2021, Peter Krempa wrote:
Unify the cases for SCPL/SCLPLM/VIRTIO consoles as the code is
*SCLP
identical.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 28
1 file changed, 28 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.a
On a Thursday in 2021, Peter Krempa wrote:
Introduce qemuDomainDeviceBackendChardevForeach(One) which calls the
callback if either given device has a chardev backend or for all chardev
backends of all devices.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 117
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
tools/virt-host-validate-qemu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
1 file changed, 1 insertion(+)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Remove the pointless cleanup sections.
Signed-off-by: Peter Krempa
---
src/lxc/lxc_controller.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signatur
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
tools/virt-host-validate-common.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/lxc/lxc_controller.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
The bitmap is allocated just above the explicit clear, so it's already
empty.
Signed-off-by: Peter Krempa
---
src/libxl/libxl_driver.c | 1 -
1 file changed, 1 deletion(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/test/test_driver.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
There were two separate instances of string->virBitmap code:
virBitmapParseInternal and virBitmapParseUnlimited.
By adding a flag to switch to expanding APIs we can merge the two
implementations into one.
Signed-off-by: Peter Krempa
---
src/util/virbi
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/libxl/libxl_driver.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory clearing for virBitmap and remove a reuse of a
temporary string.
Signed-off-by: Peter Krempa
---
src/lxc/lxc_native.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
Reviewed-by: Ján Tomko
Jano
sig
On a Thursday in 2021, Peter Krempa wrote:
In order to prepare for reuse of the function, move the allocation of
the bitmap to the caller.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
Reviewed-by: Ján To
On a Thursday in 2021, Peter Krempa wrote:
Since the feature is not needed remove it and remove the function to
virBitmapParseInternal.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
Reviewed-by: Ján Tomko
On a Thursday in 2021, Peter Krempa wrote:
The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa
---
src/conf/numa_conf.c| 3 +--
src/network/bridge_driver.c | 3 +--
src/util/virbitmap.c| 14 --
src/util/virbitmap.h| 4 +
On a Thursday in 2021, Peter Krempa wrote:
The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 9 ++---
src/util/virbitmap.h | 4 ++--
tests/virbitmaptest.c | 3 +--
3 files changed, 5 insertions(+), 11 deletions(-)
Review
On a Thursday in 2021, Peter Krempa wrote:
The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 6 +-
src/util/virbitmap.h | 4 ++--
src/util/virnuma.c| 3 +--
tests/virbitmaptest.c | 3 +--
4 files changed, 5 insertions(+)
On a Thursday in 2021, Peter Krempa wrote:
The function isn't used besides tests. Since the separator parsing
capability is trivial we can keep it in place and just unexport it for
now.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 -
src/util/virbitmap.c | 2 +-
src/util/virbi
On a Thursday in 2021, Peter Krempa wrote:
There's nothing that can fail in the function. Remove the return value
and adjust callers.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
Reviewed-by: Ján Tomko
Jano
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
tests/vircapstest.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
Reviewed-by: Ján Tomko
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
tests/virnumamock.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
tools/virsh-domain.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
Reviewed-by: Ján Tomko
Jano
si
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/util/vircgroup.c | 27 ++-
1 file changed, 10 insertions(+), 17 deletions(-)
Reviewed-by: Já
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 16 +---
1 file changed, 5 insertions(+), 11 deletions(-)
Reviewed-by: Ján Tomko
J
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
Reviewed-by: Ján Tomko
Jano
On a Thursday in 2021, Peter Krempa wrote:
Automatically free 'cmd' and 'created' by moving them to the appropriate
scopes.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_snapshot.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.as
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
Reviewed-by: Ján Tomko
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
Reviewed-by: Ján To
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
Reviewed-by: Ján Tomk
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory freeing for the 'ret' bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko
Jano
On a Thursday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 50 ++
1 file changed, 16 insertions(+), 34 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Thursday in 2021, Peter Krempa wrote:
Automatically free the 'slotmap' bitmap and get rid of the cleanup
section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain_address.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.as
On a Thursday in 2021, Peter Krempa wrote:
Use g_autoptr for the temp bitmap. To achieve this the variable must be
moved down to the appropriate scope.
Signed-off-by: Peter Krempa
---
src/hypervisor/domain_driver.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Ján
On a Thursday in 2021, Peter Krempa wrote:
Use automatic memory clearing for the temporary strings and bitmap and
remove the cleanup section. There are multiple temporary strings added
so that we don't reuse one.
The strings can be moved inside the 'if (node)' block
Signed-off-by: Peter Krem
On a Thursday in 2021, Peter Krempa wrote:
Automatically free the 'ret' temporary bitmap and get rid of the cleanup
section.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature
On a Thursday in 2021, Peter Krempa wrote:
Use automatic freeing where possible and use g_clear_pointer instead of
manual NULL-ing.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko
Jano
sign
On a Thursday in 2021, Peter Krempa wrote:
Move the 'path' and 'type' variables down to the appropriate block and
use automatic freeing for them as well as the temporary virBitmap.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 13 +++--
1 file changed, 3 insertions(+), 10 del
Since the backend of the TPM is a chardev we can use the common helper
to instantiate it.
This commit also ensures proper ordering so that the backend chardev is
formatted before it's being referenced.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 25 +++---
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 145 +++-
src/qemu/qemu_command.h | 2 -
src/qemu/qemu_process.c | 4 --
3 files changed, 55 insertions(+), 96 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 91836
Add handling to qemuDomainDeviceBackendChardevForeachOne and callbacks
so that we can later use 'qemuBuildChardevCommand' for TPM devices.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 14 +-
src/qemu/qemu_process.c | 4
tests/qemuxml2argvtest.c | 4
3 files
When setting up TLS options from config in qemuDomainPrepareChardevSourceOne
we can also extract the x509 certificate path and default tlsVerify
setting so that 'qemuBuildChardevCommand' doesn't need to access the
config object any more.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c |
Completely seprate the creation of the commandline string from the setup
of other objects instantiated on the commandline.
'qemuBuildChardevCommand' will aggregate the setup of individual
parameters such as -add-fd and setup of TLS and the -chardev parameter
itself while the code formatting the co
Make it accessible sooner inside qemu_command.c
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 442
1 file changed, 221 insertions(+), 221 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f6aab6a52c..874f875c5a
'qemuBuildChrChardevStr' used a hybrid approach where some arguments
were directly added to '@cmd' while the commandline itself was returned
as a string.
This patch renames qemuBuildChrChardevStr to qemuBuildChardevCommand
and adds the argument directly to @cmd inside the function.
Signed-off-by:
We have just one case when we wish to wait for incomming connections for
a listening socket and that is for vhost-user network devices.
Passing this via a flag to qemuBuildChrChardevStr is unwieldy. Add a
field to qemuDomainChrSourcePrivate and populate it for our special
case inside of qemuDomain
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 55 ++---
1 file changed, 18 insertions(+), 37 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 814b003e49..b637cd2bf5 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qem
Now that the test cases won't cause host modification we can add the
contemporary versions.
Signed-off-by: Peter Krempa
---
.../console-compat-auto.x86_64-latest.args| 39 +
.../console-compat-chardev.x86_64-latest.args | 39 +
.../console-compat.x86_64-latest
Use the qemuDomainDeviceBackendChardevForeach helper to iterate all
eligible structs and convert the setup of the TLS defaults from the
config.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 103 +++-
src/qemu/qemu_domain.h | 13 ++---
src/qemu/qe
Introduce qemuDomainDeviceBackendChardevForeach(One) which calls the
callback if either given device has a chardev backend or for all chardev
backends of all devices.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 117 +
src/qemu/qemu_domain.h |
'qemuBuildChrChardevStr' doesn't use these flags any more. Stop passing
them.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 64 +++--
1 file changed, 17 insertions(+), 47 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
The opening of files for FD passing for a chardev backend was
historically done in the function which is formatting the commandline.
This has multiple problems. Firstly the function takes a lot of
parameters which need to be passed through the commandline formatters.
This made the 'qemuBuildChrCha
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 7be5b51100..cb3ee324cc 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -359,6 +359,7 @@ virDomainDeviceDef
In this part I'm cleaning up the command line generators and unifying
them. Until now there were multiple custom -chardev generators in places
where it was simpler to use it than the common code. This series fixes
the common code to have sane API and refactors virtiofs, vhost-user-blk
vhost-user-gp
Now that the API for qemuBuildChrChardevCommand is sane enough, we can
use it to centralize formatting of '-chardev' generally.
The 'virDomainVideoDef' doesn't use 'virDomainChrSourceDef' internally so
we create it for this occasion manually.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_comman
Now that the API for qemuBuildChrChardevCommand is sane enough, we can
use it to centralize formatting of '-chardev' generally.
The 'virDomainFSDef' doesn't use 'virDomainChrSourceDef' internally so
we create it for this occasion manually.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c
Now that the API for qemuBuildChrChardevCommand is sane enough, we can
use it to centralize formatting of '-chardev' generally.
For virtiofs we don't have a centrally stored chardev source so we
allocate one inline for temporary use.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_block.c | 1
Add handling to qemuDomainDeviceBackendChardevForeachOne and callbacks
so that we can later use 'qemuBuildChardevCommand' for vhost-user disks
instead of a custom formatter.
Since we don't pass the FD for the vhost-user connection to qemu all of
the setup can be skipped.
Signed-off-by: Peter Krem
Now that the parameter is unused we can remove it as well as from each
caller that doesn't need it any more.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 47 +++--
1 file changed, 12 insertions(+), 35 deletions(-)
diff --git a/src/qemu/qemu_comma
Make the callers construct the alias for the chardev so that the
function can be used also for code paths which use a different
convention.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 42 +++--
1 file changed, 24 insertions(+), 18 deletions(-)
d
Unify the cases for SCPL/SCLPLM/VIRTIO consoles as the code is
identical.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 28
1 file changed, 28 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5c2b8d65fd..fb4535e889 100644
It was impossible to use _LATEST when commit d7c814f7f75 was modernizing
the cases as improper separation in the code caused that files were
created in the host during the testsuite run.
Now that the host manipulation when instantiating chardevs is separated
we can add the missing version.
Signed
The argument and corresponding enum are not used any more.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 45 ++---
1 file changed, 15 insertions(+), 30 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0baf3acde6..9
Remove the pointless cleanup sections.
Signed-off-by: Peter Krempa
---
src/lxc/lxc_controller.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index ae1f090077..c577d6a427 100644
--- a/src/lxc/l
Signed-off-by: Peter Krempa
---
tools/virt-host-validate-common.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tools/virt-host-validate-common.c
b/tools/virt-host-validate-common.c
index aba1bdf6cf..647ed7b48b 100644
--- a/tools/virt-host-validate-common.c
+++ b/to
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 83e3a5d0f1..54e2462a95 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -582,8 +582,8 @@ virHostCPUG
Signed-off-by: Peter Krempa
---
tools/virt-host-validate-qemu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/virt-host-validate-qemu.c b/tools/virt-host-validate-qemu.c
index d225a7e5c8..46ff1d2494 100644
--- a/tools/virt-host-validate-qemu.c
+++ b/tools/virt-host-
Signed-off-by: Peter Krempa
---
src/libxl/libxl_driver.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 0b14b5093e..ef31f2cdcf 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2416,7 +2416
Signed-off-by: Peter Krempa
---
src/lxc/lxc_controller.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 039efcd7c7..ae1f090077 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -731,
The bitmap is allocated just above the explicit clear, so it's already
empty.
Signed-off-by: Peter Krempa
---
src/libxl/libxl_driver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index ef31f2cdcf..bc8598ea96 100644
--- a/src/libxl/libxl_
Use automatic memory clearing for virBitmap and remove a reuse of a
temporary string.
Signed-off-by: Peter Krempa
---
src/lxc/lxc_native.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 972e9cdc15..e9b58
Signed-off-by: Peter Krempa
---
src/test/test_driver.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 7ad6e15402..995e63b004 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2826,7 +2
There were two separate instances of string->virBitmap code:
virBitmapParseInternal and virBitmapParseUnlimited.
By adding a flag to switch to expanding APIs we can merge the two
implementations into one.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 115 ++-
In order to prepare for reuse of the function, move the allocation of
the bitmap to the caller.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 1
Since the feature is not needed remove it and remove the function to
virBitmapParseInternal.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index a3f674
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 67b6910626..
The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa
---
src/conf/numa_conf.c| 3 +--
src/network/bridge_driver.c | 3 +--
src/util/virbitmap.c| 14 --
src/util/virbitmap.h| 4 ++--
src/util/virhostcpu.c | 6 ++-
The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 9 ++---
src/util/virbitmap.h | 4 ++--
tests/virbitmaptest.c | 3 +--
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/util/virbitmap.c b/src/util/virb
Automatically free 'cmd' and 'created' by moving them to the appropriate
scopes.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_snapshot.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 1a32b15f51..9a5d3e
There's nothing that can fail in the function. Remove the return value
and adjust callers.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 5f14f1e5e0..2
The function isn't used besides tests. Since the separator parsing
capability is trivial we can keep it in place and just unexport it for
now.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 -
src/util/virbitmap.c | 2 +-
src/util/virbitmap.h | 5 -
tests/virbitmaptest.
The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 6 +-
src/util/virbitmap.h | 4 ++--
src/util/virnuma.c| 3 +--
tests/virbitmaptest.c | 3 +--
4 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/util
Signed-off-by: Peter Krempa
---
tests/virnumamock.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/tests/virnumamock.c b/tests/virnumamock.c
index 19c26d1e37..7f2653cb53 100644
--- a/tests/virnumamock.c
+++ b/tests/virnumamock.c
@@ -63,29 +63,23 @@ virNumaIsAv
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
tests/vircapstest.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/tests/vircapstest.c b/tests/vircapstest.c
index d1b503384
Signed-off-by: Peter Krempa
---
src/util/virhostcpu.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index a8d8b34a39..1920184f61 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -300,10 +300,10 @@ v
Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/util/vircgroup.c | 27 ++-
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
ind
1 - 100 of 124 matches
Mail list logo