]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
4 years agoqemuMigrationCookieXMLFormat: Extract formatting of NBD
Peter Krempa [Wed, 30 Sep 2020 13:54:39 +0000 (15:54 +0200)] 
qemuMigrationCookieXMLFormat: Extract formatting of NBD

Move the code into 'qemuMigrationCookieNBDXMLFormat' and use modern XML
formatting code patterns.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieNetworkXMLFormat: Refactor XML formatting
Peter Krempa [Wed, 30 Sep 2020 13:30:20 +0000 (15:30 +0200)] 
qemuMigrationCookieNetworkXMLFormat: Refactor XML formatting

Use 'virXMLFormatElement' both for formating the whole <network> element
but also for formatting the <interface> subelements. This alows to
remove the crazy logic which was determining which element was already
formatted.

Additional simplification is achieved by switching to skipping the loop
using 'continue' rather than putting everything in a giant block.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieGraphicsXMLFormat: Use 'virXMLFormatElement'
Peter Krempa [Wed, 30 Sep 2020 13:24:19 +0000 (15:24 +0200)] 
qemuMigrationCookieGraphicsXMLFormat: Use 'virXMLFormatElement'

Switch to the two buffer approach to simplify the logic for terminating
the element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieXMLParse: Remove 'error' label
Peter Krempa [Wed, 30 Sep 2020 13:06:11 +0000 (15:06 +0200)] 
qemuMigrationCookieXMLParse: Remove 'error' label

Now it only returns -1 so we can do that directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieXMLParse: Remove comment mentioning that error was already set
Peter Krempa [Wed, 30 Sep 2020 13:04:45 +0000 (15:04 +0200)] 
qemuMigrationCookieXMLParse: Remove comment mentioning that error was already set

Most of our functions report errors so there's no need to mention it
here again.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieXMLParse: Decrease scope of 'nodes' and use automatic freeing
Peter Krempa [Wed, 30 Sep 2020 13:03:59 +0000 (15:03 +0200)] 
qemuMigrationCookieXMLParse: Decrease scope of 'nodes' and use automatic freeing

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieXMLParse: Check domain element count more defensively
Peter Krempa [Wed, 30 Sep 2020 13:00:43 +0000 (15:00 +0200)] 
qemuMigrationCookieXMLParse: Check domain element count more defensively

Make sure that 'virXPathNodeSet' returns '1' as the only expected value
rather than relying on the fact that the previous check for the number
of elements ensures success of the subsequent call.

The error message no longer mentions the number of <domain> elements in
the cookie, but this is a very unlikely internal error anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuMigrationCookieXMLParse: Switch to single-purpose temporary variables
Peter Krempa [Wed, 30 Sep 2020 12:58:26 +0000 (14:58 +0200)] 
qemuMigrationCookieXMLParse: Switch to single-purpose temporary variables

Don't reuse 'tmp' over and over, but switch to single use automaticaly
freed variables instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemu: migration_cookie: Extract parsing/validation of mandatory features
Peter Krempa [Wed, 30 Sep 2020 12:31:47 +0000 (14:31 +0200)] 
qemu: migration_cookie: Extract parsing/validation of mandatory features

Move the code into 'qemuMigrationCookieXMLParseMandatoryFeatures' to
simplify 'qemuMigrationCookieXMLParse'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemuDomainFilterHotplugVcpuEntities: Refactor memory freeing to remove 'cleanup'...
Peter Krempa [Fri, 2 Oct 2020 08:39:23 +0000 (10:39 +0200)] 
qemuDomainFilterHotplugVcpuEntities: Refactor memory freeing to remove 'cleanup' label

After recent refactors the function can be refactored to remove the
'cleanup' label by using autoptr for the 'map' variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirDomainResctrlNew: Refactor allocation to remove 'cleanup' label
Peter Krempa [Fri, 2 Oct 2020 08:36:59 +0000 (10:36 +0200)] 
virDomainResctrlNew: Refactor allocation to remove 'cleanup' label

If we use g_new0 there's no need for the 'cleanup' label as there's
nothing to fail after the allocation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoutil: virbitmap: Remove virBitmapCopy
Peter Krempa [Fri, 2 Oct 2020 08:28:51 +0000 (10:28 +0200)] 
util: virbitmap: Remove virBitmapCopy

The function is now unused.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoUse 'virBitmapNewCopy' instead of 'virBitmapCopy'
Peter Krempa [Fri, 2 Oct 2020 08:26:34 +0000 (10:26 +0200)] 
Use 'virBitmapNewCopy' instead of 'virBitmapCopy'

There are only 3 places using the function. Two can use virBitmapNewCopy
directly. In case of the qemu capabilities code we need to free the old
bitmap first.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoDon't check return value of virBitmapNewCopy
Peter Krempa [Fri, 2 Oct 2020 08:34:53 +0000 (10:34 +0200)] 
Don't check return value of virBitmapNewCopy

The function will not fail any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapNewCopy: Reimplement bitmap copying to prevent failure
Peter Krempa [Fri, 2 Oct 2020 08:22:18 +0000 (10:22 +0200)] 
virBitmapNewCopy: Reimplement bitmap copying to prevent failure

virBitmapCopy has a failure condition, which is impossible to meet when
creating a new copy. Copy the contents directly to make it obvious that
virBitmapNewCopy can't fail.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapNew: Don't check return value
Peter Krempa [Thu, 1 Oct 2020 15:42:11 +0000 (17:42 +0200)] 
virBitmapNew: Don't check return value

Remove return value check from all callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoutil: bitamp: Remove virBitmapNewEmpty
Peter Krempa [Thu, 1 Oct 2020 15:02:16 +0000 (17:02 +0200)] 
util: bitamp: Remove virBitmapNewEmpty

It can be replaced by virBitmapNew(0).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Remove unnecessary error/cleanup labels
Peter Krempa [Thu, 1 Oct 2020 14:36:05 +0000 (16:36 +0200)] 
virbitmaptest: Remove unnecessary error/cleanup labels

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Use g_auto(free) for cleanup
Peter Krempa [Thu, 1 Oct 2020 14:26:51 +0000 (16:26 +0200)] 
virbitmaptest: Use g_auto(free) for cleanup

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Refactor checks in 'test6'
Peter Krempa [Mon, 5 Oct 2020 10:10:42 +0000 (12:10 +0200)] 
virbitmaptest: Refactor checks in 'test6'

The 'checkBitmap' helper uses 'virBitmapFormat' internally and also
reports better errors. Use it instead of the open-coded checks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Turn 'TEST_MAP' macro into a helper function
Peter Krempa [Mon, 5 Oct 2020 10:06:14 +0000 (12:06 +0200)] 
virbitmaptest: Turn 'TEST_MAP' macro into a helper function

The function will also be reusable in other places of the code by making
the size check optional. For now only test12* is refactored since it
used TEST_MAP directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Use separate output strings in 'test5'
Peter Krempa [Mon, 5 Oct 2020 09:28:14 +0000 (11:28 +0200)] 
virbitmaptest: Use separate output strings in 'test5'

The test validates two outputs. Don't reuse 'str' for both.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Split up test4
Peter Krempa [Mon, 5 Oct 2020 09:17:38 +0000 (11:17 +0200)] 
virbitmaptest: Split up test4

'test4' was testing three distinct operations on separate instances of a
bitmap. Split it up into 'test4a', 'test4b' and 'test4c' so that the
'bitmap' variable is not reused.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Split up test12
Peter Krempa [Mon, 5 Oct 2020 09:17:38 +0000 (11:17 +0200)] 
virbitmaptest: Split up test12

'test12' was testing two distinct operations on two instances of a
bitmap. Split it up into 'test12a' and 'test12b' so that the 'bitmap'
variable is not reused.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agorpm: drop ia64, sparc64 and alpha architectures
Daniel P. Berrangé [Mon, 5 Oct 2020 12:17:02 +0000 (13:17 +0100)] 
rpm: drop ia64, sparc64 and alpha architectures

None of these arches are relevant to current Fedora or RHEL distros.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agovbox: use g_new0 instead of VIR_ALLOC
Ján Tomko [Wed, 30 Sep 2020 13:07:09 +0000 (15:07 +0200)] 
vbox: use g_new0 instead of VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovbox: refactor vboxNetworkGetXMLDesc a bit
Ján Tomko [Fri, 2 Oct 2020 18:02:48 +0000 (20:02 +0200)] 
vbox: refactor vboxNetworkGetXMLDesc a bit

Error out on allocation failure to reduce the nesting.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovbox: invert condition in vboxSnapshotGetReadOnlyDisks
Ján Tomko [Sun, 4 Oct 2020 21:18:06 +0000 (23:18 +0200)] 
vbox: invert condition in vboxSnapshotGetReadOnlyDisks

Error out on (impossible) failed allocation, to reduce
indentation.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovbox: vboxDumpAudio: invert conditions
Ján Tomko [Fri, 2 Oct 2020 17:55:02 +0000 (19:55 +0200)] 
vbox: vboxDumpAudio: invert conditions

Elimination of the positive conditions reduces
the indentation by two levels.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agodocs: use "::" instead of ".. code-block::"
Daniel P. Berrangé [Mon, 5 Oct 2020 10:27:44 +0000 (11:27 +0100)] 
docs: use "::" instead of ".. code-block::"

The former is a short hand for the latter and is already widely used in
the docs. Using the short hand avoids incompatibility with the alternate
impl of rst2html5.

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agovz: use g_new0 instead of VIR_ALLOC
Ján Tomko [Wed, 30 Sep 2020 13:07:29 +0000 (15:07 +0200)] 
vz: use g_new0 instead of VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovz: vzEatCookie: separate allocation
Ján Tomko [Fri, 2 Oct 2020 18:11:56 +0000 (20:11 +0200)] 
vz: vzEatCookie: separate allocation

Use g_new0 outside of the error condition.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovz: vzEatCookie: use distinct 'tmp' variables
Ján Tomko [Fri, 2 Oct 2020 18:09:00 +0000 (20:09 +0200)] 
vz: vzEatCookie: use distinct 'tmp' variables

Mark both as g_autofree within their separate scopes.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovz: separate if conditions in vzEatCookie
Ján Tomko [Fri, 2 Oct 2020 18:06:39 +0000 (20:06 +0200)] 
vz: separate if conditions in vzEatCookie

Create a separate scope where 'tmp' variable can be used.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovmware: use g_new0 instead of VIR_ALLOC
Ján Tomko [Wed, 30 Sep 2020 13:07:24 +0000 (15:07 +0200)] 
vmware: use g_new0 instead of VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonews: move section about downscript to v6.4.0
Ján Tomko [Sun, 4 Oct 2020 20:24:00 +0000 (22:24 +0200)] 
news: move section about downscript to v6.4.0

The feature was merged in v6.3.0-175-g61ba6f09b1

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 4eda71a8d05d968e73ab9b0fdc8a90123c57d39e
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoAPI: virDomainLookupByID: s/UUId/UUID/
Ján Tomko [Sun, 4 Oct 2020 22:20:22 +0000 (00:20 +0200)] 
API: virDomainLookupByID: s/UUId/UUID/

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
4 years agoqemuSlirpNew: Use g_new0 to allocate the slirp object
Peter Krempa [Thu, 1 Oct 2020 15:28:46 +0000 (17:28 +0200)] 
qemuSlirpNew: Use g_new0 to allocate the slirp object

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoutil: bitmap: Remove virBitmapNewQuiet
Peter Krempa [Thu, 1 Oct 2020 14:56:48 +0000 (16:56 +0200)] 
util: bitmap: Remove virBitmapNewQuiet

We no longer report any errors so all callers can be replaced by
virBitmapNew. Additionally virBitmapNew can't return NULL now so error
handling is not necessary.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapNew: Don't force return value check
Peter Krempa [Thu, 1 Oct 2020 15:42:48 +0000 (17:42 +0200)] 
virBitmapNew: Don't force return value check

We now always return a valid pointer or crash so the return value
doesn't need to be checked.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapNewQuiet: Don't fail on unlikely overflow scenario
Peter Krempa [Thu, 1 Oct 2020 14:52:30 +0000 (16:52 +0200)] 
virBitmapNewQuiet: Don't fail on unlikely overflow scenario

Modify the condition which would make virBitmapNewQuiet fail to possibly
overallocate by 1 rather than failing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: Add few more cases for virBitmapToString
Peter Krempa [Thu, 1 Oct 2020 12:14:21 +0000 (14:14 +0200)] 
virbitmaptest: Add few more cases for virBitmapToString

Test an empty bitmap including it's extension via the self-expanding
APIs and and a "0" and "" strings when converting the string back and
forth.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoutil: virbitmap: Don't forbid 0 size bitmap
Peter Krempa [Thu, 1 Oct 2020 14:45:59 +0000 (16:45 +0200)] 
util: virbitmap: Don't forbid 0 size bitmap

We now have APIs which automatically expand the bitmap and also API
which allocates a 0 size bitmap. Remove the condition from virBitmapNew.

Effectively reverts ce49cfb48ad

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirbitmaptest: test13: Refactor memory cleanup
Peter Krempa [Thu, 1 Oct 2020 14:16:21 +0000 (16:16 +0200)] 
virbitmaptest: test13: Refactor memory cleanup

Move scope of variables and get rid of the 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapToString: Properly handle empty bitmaps
Peter Krempa [Thu, 1 Oct 2020 12:13:37 +0000 (14:13 +0200)] 
virBitmapToString: Properly handle empty bitmaps

virBitmapNewEmpty() can create a bitmap with 0 length. With such a
bitmap virBitmapToString will return NULL rather than an empty string.
Initialize the buffer to avoid that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapToString|virBitmapNewString: Clarify semantics of the 'string'
Peter Krempa [Thu, 1 Oct 2020 13:52:34 +0000 (15:52 +0200)] 
virBitmapToString|virBitmapNewString: Clarify semantics of the 'string'

Clarify which bit is considered most significant in the bitmap and
resulting string. Also be explicit that it's a hex string.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirBitmapToString: Remove unused 'prefix' and 'trim' arguments
Peter Krempa [Thu, 1 Oct 2020 13:22:24 +0000 (15:22 +0200)] 
virBitmapToString: Remove unused 'prefix' and 'trim' arguments

There's only one combination used so we can remove the rest.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agovirQEMUCapsFlagsString: Remove unused function
Peter Krempa [Thu, 1 Oct 2020 12:11:42 +0000 (14:11 +0200)] 
virQEMUCapsFlagsString: Remove unused function

Unused since a7424faff0fe8270c18d5e9e3befcfd2822d421f

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoexamples: fix misc spelling errors reported by codespell
Daniel P. Berrangé [Fri, 2 Oct 2020 14:07:27 +0000 (15:07 +0100)] 
examples: fix misc spelling errors reported by codespell

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agotools: fix misc spelling errors reported by codespell
Daniel P. Berrangé [Fri, 2 Oct 2020 14:07:27 +0000 (15:07 +0100)] 
tools: fix misc spelling errors reported by codespell

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agotests: fix misc spelling errors reported by codespell
Daniel P. Berrangé [Fri, 2 Oct 2020 14:07:27 +0000 (15:07 +0100)] 
tests: fix misc spelling errors reported by codespell

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agosrc: fix misc spelling errors reported by codespell
Daniel P. Berrangé [Fri, 2 Oct 2020 14:07:27 +0000 (15:07 +0100)] 
src: fix misc spelling errors reported by codespell

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agodocs: fix misc spelling errors reported by codespell
Daniel P. Berrangé [Fri, 2 Oct 2020 14:07:27 +0000 (15:07 +0100)] 
docs: fix misc spelling errors reported by codespell

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agovircommand.c: write child pidfile before process tuning in virExec()
Daniel Henrique Barboza [Thu, 1 Oct 2020 13:34:24 +0000 (10:34 -0300)] 
vircommand.c: write child pidfile before process tuning in virExec()

When VIR_EXEC_DAEMON is true and cmd->pidfile exists, the parent
will expect the pidfile to be written before exiting, sitting
tight in a saferead() call waiting.

The child then does process tuning (via virProcessSet* functions)
before writing the pidfile. Problem is that these tunings can
fail, and trigger a 'fork_error' jump, before cmd->pidfile is
written. The result is that the process was aborted in the
child, but the parent is still hang in the saferead() call.

This behavior can be reproduced by trying to create and execute
a QEMU guest in user mode (e.g. using qemu:///session as non-root).
virProcessSetMaxMemLock() will fail if the spawned libvirtd user
process does not have CAP_SYS_RESOURCE capability. setrlimit() will
fail, and a 'fork_error' jump is triggered before cmd->pidfile
is written. The parent will hung in saferead() indefinitely. From
the user perspective, 'virsh start <guest>' will hang up
indefinitely. CTRL+C can be used to retrieve the terminal, but
any subsequent 'virsh' call will also hang because the previous
libvirtd user process is still there.

We can fix this by moving all virProcessSet*() tuning functions
to be executed after cmd->pidfile is taken care of. In the case
mentioned above, this would be the result of 'virsh start'
after this patch:

error: Failed to start domain vm1
error: internal error: Process exited prior to exec: libvirt:  error :
cannot limit locked memory to 79691776: Operation not permitted

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1882093

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
4 years agoNEWS: mention CVE-2020-25637 in v6.8.0 release notes
Mauro Matteo Cascella [Fri, 2 Oct 2020 11:09:35 +0000 (13:09 +0200)] 
NEWS: mention CVE-2020-25637 in v6.8.0 release notes

Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agodocs: glib-adoption: add string arrays and objects
Ján Tomko [Thu, 24 Sep 2020 12:15:52 +0000 (14:15 +0200)] 
docs: glib-adoption: add string arrays and objects

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agodocs: glib-adoption: add links to GLib documentation
Ján Tomko [Thu, 24 Sep 2020 12:07:20 +0000 (14:07 +0200)] 
docs: glib-adoption: add links to GLib documentation

Make life a bit easier for people unfamiliar with GLib.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agodocs: glib-adoption: split into sections
Ján Tomko [Thu, 24 Sep 2020 11:50:49 +0000 (13:50 +0200)] 
docs: glib-adoption: split into sections

Although all the mentioned functions deal with
allocation, replacing the pure allocation
functions is easier than converting code to
use GArrays.

Split them out to encourage usage of GLib
allocation APIs even at the cost of them
being combined with VIR_*ELEMENT APIs.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agodocs: glib-adoption: remove stuff we alredy removed
Ján Tomko [Thu, 24 Sep 2020 11:22:46 +0000 (13:22 +0200)] 
docs: glib-adoption: remove stuff we alredy removed

https://www.redhat.com/archives/libvir-list/2020-May/msg00299.html

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agodocs: build glib-adoption.html
Ján Tomko [Thu, 24 Sep 2020 12:22:17 +0000 (14:22 +0200)] 
docs: build glib-adoption.html

We switched to meson in the meantime so the conversion
to HTML has to be explicitly requested.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agoRevert "docs: Drop glib-adoption.rst"
Ján Tomko [Thu, 24 Sep 2020 07:11:17 +0000 (09:11 +0200)] 
Revert "docs: Drop glib-adoption.rst"

Cleaning up after Andrea as he requested:
https://www.redhat.com/archives/libvir-list/2020-May/msg00405.html

This reverts commit 842d3712ed612f213b454e610cc7ff9db2321803

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agoRevert "Also look for dmi information in /sys/class"
Ján Tomko [Wed, 30 Sep 2020 16:44:53 +0000 (18:44 +0200)] 
Revert "Also look for dmi information in /sys/class"

Assume nobody runs current libvirt on kernels such as 2.6.26.

Kernel commit 9f9c9cbb60576a1518d0bf93fb8e499cffccf377 (released
in 3.8) mentions the new path and I believe it was added by:
commit 948af1f0bbc8526448e8cbe3f8d3bf211bdf5181
    firmware: Basic dmi-sysfs support
(released in 2.6.39), but I cannot figure out how all that
kernel automagic works.

This reverts commit 4c81b0fdc57b23d80b1b4752cd6143d15c02e9c8

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agovmx; Free @checkMACAddress in virVMXParseEthernet()
Michal Privoznik [Fri, 2 Oct 2020 08:39:58 +0000 (10:39 +0200)] 
vmx; Free @checkMACAddress in virVMXParseEthernet()

The @checkMACAddress string is allocated in
virVMXGetConfigString() but never freed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
4 years agovirfirewalltest: Don't duplicate string when adding it onto stringlist
Michal Privoznik [Fri, 2 Oct 2020 08:37:26 +0000 (10:37 +0200)] 
virfirewalltest: Don't duplicate string when adding it onto stringlist

In our wrapper of g_dbus_connection_call_sync() in
virfirewalltest a string is duplicated and added onto a
virStringList. This leads to a memory leak because
virStringListAdd() duplicates the string itself.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
4 years agotests: Set G_DEBUG environment variable
Michal Privoznik [Fri, 2 Oct 2020 08:34:11 +0000 (10:34 +0200)] 
tests: Set G_DEBUG environment variable

With us switching to glib more and more it is easy to get things
wrong (as can be seen in the previous commit). Set G_DEBUG
variable to "fatal-warnings" which causes GLib to abort the
program at the first call to g_warning() or g_critical().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
4 years agotests: fix incorrect free of GVariant in our GLib mock functions
Pavel Hrdina [Fri, 2 Oct 2020 10:11:45 +0000 (12:11 +0200)] 
tests: fix incorrect free of GVariant in our GLib mock functions

GLib implementation of g_dbus_connection_call_sync() calls
g_variant_ref_sink() on the passed @parameters to make sure they have
proper reference. If the original reference is floating the
g_dbus_connection_call_sync() consumes it, but if it's normal reference
it will just add another one.

Our mock functions were only freeing the @parameters which is incorrect
and doesn't reflect how the real implementation works.

Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agobuild: remove old macvtap and virtualport leftovers
Pino Toscano [Fri, 2 Oct 2020 05:15:18 +0000 (07:15 +0200)] 
build: remove old macvtap and virtualport leftovers

Followup of commit a79e7639daffac04b088378e6c79854fcac292f3 and
commit 7556ab139fd2e503ac26ee232ab273f1ec027c21

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agoNEWS: Mention <transient/> disk support for qemu
Peter Krempa [Thu, 24 Sep 2020 11:32:37 +0000 (13:32 +0200)] 
NEWS: Mention <transient/> disk support for qemu

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agologging: fix endless loop on EOF
Nikolay Shirokovskiy [Thu, 24 Sep 2020 12:54:24 +0000 (15:54 +0300)] 
logging: fix endless loop on EOF

On EOF condition we always have POLLHUP event and read returns
0 thus we never break loop in virLogHandlerDomainLogFileDrain.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agologging: read all bytes on EOF in event handler
Nikolay Shirokovskiy [Thu, 24 Sep 2020 12:47:09 +0000 (15:47 +0300)] 
logging: read all bytes on EOF in event handler

If writing side writes enough bytes to the pipe and closes writing
end then we got both VIR_EVENT_HANDLE_HANGUP and VIR_EVENT_HANDLE_READ
in handler. Currently in this situation handler reads 1024 bytes
and finish reading leaving unread data in pipe.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agobuild: remove duplicate check for GET_VLAN_VID_CMD
Laine Stump [Wed, 30 Sep 2020 22:51:45 +0000 (18:51 -0400)] 
build: remove duplicate check for GET_VLAN_VID_CMD

Somehow this check was duplicated just below the original.

(I was at first skeptical that it's needed at all, since
GET_VLAN_VID_CMD was already present in kernel 2.6.32, but then I
realized that there is no higher level check for __linux__ around the
code that is conditional on WITH_DECL_GET_VLAN_VID_CMD; it only checks
for SIOCGIFVLAN and WITH_STRUCT_IFREQ - the latter is also present on
*BSD platforms, the former doesn't seem to be anywhere but Linux, but
I didn't want to change the effect of the conditional, so I left it in
(we could have also replaced WITH_DECL_GET_VLAN_VID_CMD, but possibly
there is a non-Linux platform that *does* have it...)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoutil: provide non-netlink/libnl alternative for virNetDevGetMaster()
Laine Stump [Wed, 30 Sep 2020 21:56:00 +0000 (17:56 -0400)] 
util: provide non-netlink/libnl alternative for virNetDevGetMaster()

Lack of this one function (which is called for each active tap device
every time libvirtd is started) is the one thing preventing a
"WITHOUT_LIBNL" build of libvirt from being useful. With this
alternate implementation, guests using standard tap devices will work
properly even when libvirt is built without libnl support.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoutil: fix Linux build when libnl-devel isn't available
Laine Stump [Wed, 30 Sep 2020 20:36:52 +0000 (16:36 -0400)] 
util: fix Linux build when libnl-devel isn't available

There was one stray bit of code in virnetdev.c that required libnl to
build, but wasn't qualified by defined(WITH_LIBNL). Adding that, plus
putting a similar check around a static function only used by that
aforementioned code, makes libvirt build properly without libnl3-devel
installed.

How useful it is in that state is a separate issue :-)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agobuild: eliminate WITH_MACVTAP flag entirely
Laine Stump [Tue, 29 Sep 2020 14:54:38 +0000 (10:54 -0400)] 
build: eliminate WITH_MACVTAP flag entirely

This flag was originally created to indicate that either 1) the build
platform wasn't linux, 2) the build platform was linux, but the kernel
was too old to have macvtap support. Since there was already a switch
there, the ability to also disable it when 3) the kernel supports
macvtap but the user doesn't want it, was added in. I don't think that
(3) was ever an intentional goal, just something that grew naturally
out of having the flag there in the first place (unless possibly the
original author wanted a way to quickly disable their new code in case
it caused regressions elsewhere).

Now that the check for (2) has been removed, WITH_MACVTAP is just
checking (1) and (3), but (3) is pointless (because the extra code in
libvirt itself is miniscule, and the only external library needed for
it is libnl, which is also required for other unrelated features (and
itself has no subordinate dependencies and takes up < 1MB on
disk)). We can therfore eliminate the WITH_MACVTAP flag, as it is
functionally equivalent to WITH_LIBNL (which implies __linux__).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agobuild: simplify check for WITH_MACVTAP
Laine Stump [Tue, 29 Sep 2020 13:56:18 +0000 (09:56 -0400)] 
build: simplify check for WITH_MACVTAP

macvtap support was added to the Linux kernel in 2.6.33. libvirt
checked for this by looking for MACVLAN_MODE_BRIDGE and IFLA_VF_MAX in
linux/if_link.h. This hasn't been necessary for a very long time, so
just gate on platform == 'linux' (and be sure to complain if someone
tries to enable it on a non-Linux platform).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agobuild: remove check for MACVLAN_MODE_PASSTHRU
Laine Stump [Tue, 29 Sep 2020 13:43:54 +0000 (09:43 -0400)] 
build: remove check for MACVLAN_MODE_PASSTHRU

macvlan support was added to the Linux kernel in 2.6.33, but
MACVLAN_MODE_PASSTHRU wasn't added until 2.6.38, so a workaround had
been put in place to define that constant on those few systems where
it was missing. It's useful like was probably 6 months at most, but
it's been there for over 10 years.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agobuild: eliminate useless WITH_VIRTUALPORT check
Laine Stump [Mon, 28 Sep 2020 21:39:46 +0000 (17:39 -0400)] 
build: eliminate useless WITH_VIRTUALPORT check

WITH_VIRTUALPORT just checks that we are building on Linux and that
IFLA_PORT_MAX is defined in linux/if_link.h. Back when 802.11Qb[gh]
support was added, the IFLA_* stuff was new (introduced in kernel
2.6.35, backported to RHEL6 2.6.32 kernel at some point), and so this
extra check was necessary, because libvirt was being built on Linux
distros that didn't yet have IFLA_* (e.g. older RHEL6, all
RHEL5). It's been in the kernel for a *very* long time now, so all
supported versions of all Linux platforms libvirt builds on have it.

Note that the above paragraph implies that the conditional compilation
should be changed to #if defined(__linux__). However, the astute
reader will notice that the code in question is sending and receiving
netlink messages, so it really should be conditional on WITH_LIBNL
(which implies __linux__) instead, so that's what this patch does.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoutil: remove extraneous defined(__linux__) when checking for WITH_LIBNL
Laine Stump [Mon, 28 Sep 2020 21:29:41 +0000 (17:29 -0400)] 
util: remove extraneous defined(__linux__) when checking for WITH_LIBNL

WITH_LIBNL will only be defined on Linux platforms (because libnl is a
library written to encapsulate parts of netlink, which is a Linux-only
API), so it's redundant to write:

  #if defined(__linux__) && defined(WITH_LIBNL)

We can just check for WITH_LIBNL.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoutil: remove useless checks for IFLA_VF_MAX
Laine Stump [Mon, 28 Sep 2020 19:53:48 +0000 (15:53 -0400)] 
util: remove useless checks for IFLA_VF_MAX

IFLA_VF_MAX was introduced to the Linux kernel in 2.6.35, and was even
backported to the RHEL*6* 2.6.32 kernel downstream, so it is present
in all supported versions of all Linux distros that libvirt builds
on. Additionally, it can't be conditionally compiled out of a
kernel. There is no reason to conditionalize any piece of code on
presence of IFLA_VF_MAX - if the platform is Linux, it is supported.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: use g_free() instead of VIR_FREE in virDomainNetDefFree()
Laine Stump [Sat, 26 Sep 2020 16:59:11 +0000 (12:59 -0400)] 
conf: use g_free() instead of VIR_FREE in virDomainNetDefFree()

All these lines were moved over from the now-defunct
virDomainNetDefClear(), which required all pointers to be cleared
after free, but virDomainNetDefFree() doesn't have that restriction -
after free'ing the pointers are never again referenced, so g_free() is
safe.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: eliminate virDomainNetDefClear()
Laine Stump [Wed, 23 Sep 2020 01:33:42 +0000 (21:33 -0400)] 
conf: eliminate virDomainNetDefClear()

This function is no longer used anywhere except virDomainNetDefFree(),
so just inline its contents there.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoqemu: eliminate use of virDomainNetDefClear() in qemuConnectDomainXMLToNative()
Laine Stump [Wed, 23 Sep 2020 01:19:38 +0000 (21:19 -0400)] 
qemu: eliminate use of virDomainNetDefClear() in qemuConnectDomainXMLToNative()

Instead of saving the interesting pieces of each existing NetDef,
clearing it, and then copying back the saved pieces after setting the
type to ethernet, just create a new NetDef, copy in the interesting
bits, and replace the old one. (The end game is to eliminate
virDomainNetDefClear() completely, since this is the only real use)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: introduce virDomainDefControllersParse
Ján Tomko [Tue, 28 Jul 2020 22:57:46 +0000 (00:57 +0200)] 
conf: introduce virDomainDefControllersParse

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: introduce virDomainDefClockParse
Ján Tomko [Tue, 28 Jul 2020 22:53:52 +0000 (00:53 +0200)] 
conf: introduce virDomainDefClockParse

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: introduce virDomainDefLifecycleParse
Ján Tomko [Tue, 28 Jul 2020 22:50:24 +0000 (00:50 +0200)] 
conf: introduce virDomainDefLifecycleParse

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: introduce virDomainDefTunablesParse
Ján Tomko [Tue, 28 Jul 2020 22:33:56 +0000 (00:33 +0200)] 
conf: introduce virDomainDefTunablesParse

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: split out virDomainDefParseMemory
Ján Tomko [Tue, 28 Jul 2020 22:25:17 +0000 (00:25 +0200)] 
conf: split out virDomainDefParseMemory

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoconf: split out virDomainDefParseIDs
Ján Tomko [Tue, 28 Jul 2020 22:18:27 +0000 (00:18 +0200)] 
conf: split out virDomainDefParseIDs

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agorpc: use g_new0 instead of VIR_ALLOC
Ján Tomko [Thu, 24 Sep 2020 18:58:46 +0000 (20:58 +0200)] 
rpc: use g_new0 instead of VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agogendispatch: use g_new0 instead of VIR_ALLOC
Ján Tomko [Wed, 30 Sep 2020 13:40:06 +0000 (15:40 +0200)] 
gendispatch: use g_new0 instead of VIR_ALLOC

Take the easy way out and use typeof, because my life
is too short to spend it reading gendispatch.pl.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agologging: use g_new0 instead of VIR_ALLOC
Ján Tomko [Wed, 30 Sep 2020 12:58:44 +0000 (14:58 +0200)] 
logging: use g_new0 instead of VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agolocking: prefer g_new0 to VIR_ALLOC
Ján Tomko [Tue, 29 Sep 2020 16:45:18 +0000 (18:45 +0200)] 
locking: prefer g_new0 to VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agolibxl: prefer g_new0 to VIR_ALLOC
Ján Tomko [Wed, 23 Sep 2020 18:43:09 +0000 (20:43 +0200)] 
libxl: prefer g_new0 to VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agoutil: remove compile time tests for IFF_VNET_HDR/IFF_MULTI_QUEUE
Daniel P. Berrangé [Thu, 24 Sep 2020 11:12:37 +0000 (12:12 +0100)] 
util: remove compile time tests for IFF_VNET_HDR/IFF_MULTI_QUEUE

The former has been present since

  commit f43798c27684ab925adde7d8acc34c78c6e50df8
  Author: Rusty Russell <rusty@rustcorp.com.au>
  Date:   Thu Jul 3 03:48:02 2008 -0700

    tun: Allow GSO using virtio_net_hdr

and the latter since

  commit bbb009941efaece3898910a862f6d23aa55d6ba8
  Author: Jason Wang <jasowang@redhat.com>
  Date:   Wed Oct 31 19:45:59 2012 +0000

    tuntap: introduce multiqueue flags

these are old enough that they can be assumed present in all Linux
platforms we support. The tap device creation code changed is specific
to Linux, with a separate impl for non-Linux platforms.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoqemuxml2xmloutdata: Make more symlinks
Michal Privoznik [Mon, 24 Aug 2020 17:14:52 +0000 (19:14 +0200)] 
qemuxml2xmloutdata: Make more symlinks

I've found two files under qemuxml2xmloutdata/ that are the same
as in qemuxml2argvdata/. Replace them with symlinks.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agostorage: use g_new0 instead of VIR_ALLOC*
Ján Tomko [Wed, 23 Sep 2020 18:41:28 +0000 (20:41 +0200)] 
storage: use g_new0 instead of VIR_ALLOC*

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 years agostorage: scsi: invert logic in createVport
Ján Tomko [Thu, 24 Sep 2020 18:55:24 +0000 (20:55 +0200)] 
storage: scsi: invert logic in createVport

Check whether the alloc result is negative (which is
cannot happen with current code) to reduce churn in
the following commit.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 years agosrc: libvirt-stream: use g_new0 instead of VIR_ALLOC*
Ján Tomko [Wed, 23 Sep 2020 18:43:49 +0000 (20:43 +0200)] 
src: libvirt-stream: use g_new0 instead of VIR_ALLOC*

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 years agointerface: use g_new0 instead of VIR_ALLOC*
Ján Tomko [Wed, 23 Sep 2020 18:44:23 +0000 (20:44 +0200)] 
interface: use g_new0 instead of VIR_ALLOC*

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 years agohyperv: use g_new0 instead of VIR_ALLOC*
Ján Tomko [Wed, 23 Sep 2020 18:44:11 +0000 (20:44 +0200)] 
hyperv: use g_new0 instead of VIR_ALLOC*

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>