]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
5 years agoutil: add note about event file descriptors on Windows
Daniel P. Berrangé [Wed, 18 Dec 2019 16:46:07 +0000 (16:46 +0000)] 
util: add note about event file descriptors on Windows

When using GNULIB with Winsock, libvirt will never see the normal HANDLE
objects, instead GNULIB guarantees that libvirt gets a C runtime file
descriptor. The GNULIB poll impl also expects to get C runtime file
descriptors rather than HANDLE objects. Document this behaviour so that
it is clear to applications providing event loop implementations if they
need Windows portability.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agotravis: add macOS Xcode 11.3 testing
Daniel P. Berrangé [Mon, 23 Dec 2019 14:20:46 +0000 (14:20 +0000)] 
travis: add macOS Xcode 11.3 testing

Ideally we would test macOS 10.15 as the newest release, however, that
is not available in Travis yet. We can at least test newer XCode
versions though to get toolchain validation.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agodocs: expand macOS platform support coverage
Daniel P. Berrangé [Mon, 23 Dec 2019 14:15:40 +0000 (14:15 +0000)] 
docs: expand macOS platform support coverage

We initially claimed to only support the most recent macOS
release, which is currently 10.15. Our Travis CI, however,
is validating 10.14.4 / XCode 10.3.

For almost all of our other platforms, we support multiple
releases to some degree. This change brings macOS in line
with other long life distros, covering the most recent &
most recent but one for a 2 year overlap. With this docs
change our CI is now actually testing our minimum version.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agobuild: set min version for CLang to 3.4 / XCode CLang to 5.1
Daniel P. Berrangé [Mon, 23 Dec 2019 14:06:46 +0000 (14:06 +0000)] 
build: set min version for CLang to 3.4 / XCode CLang to 5.1

We have a strong check for GCC >= 4.8, but don't validate any
version number for CLang historically.

This defines the min CLang to be 3.4 which is what is available
for RHEL-7. macOS uses a different versioning scheme for CLang,
based off XCode versions. There is a mapping recorded at

  https://en.wikipedia.org/wiki/Xcode#Toolchain_versions

Here we see upstream CLang 3.4 corresponds to XCode 5.1

XCode 5.1 is available for macOS 10.8.4 or later which
trivially satisfies our platform support matrix requirements.

All these versions match what QEMU declares for its min GCC
and CLang checks.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agovirsh: Add a completer for `domifaddr` --source parameter.
Julio Faracco [Thu, 2 Jan 2020 15:07:06 +0000 (12:07 -0300)] 
virsh: Add a completer for `domifaddr` --source parameter.

The command `domifaddr` can use three different sources to grab IP
address of a Virtual Machine: lease, agent and arp. This parameter does
not have a completer function to return source options.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
5 years agotravis: fix homebrew install of python3
Daniel P. Berrangé [Thu, 2 Jan 2020 13:40:48 +0000 (13:40 +0000)] 
travis: fix homebrew install of python3

The Python3 package has started failing to install from
HomeBrew with the following:

  Error: The `brew link` step did not complete successfully
  The formula built, but is not symlinked into /usr/local
  Could not symlink Frameworks/Python.framework/Headers
  Target /usr/local/Frameworks/Python.framework/Headers
  is a symlink belonging to python@2. You can unlink it:

    brew unlink python@2

  To force the link and overwrite all conflicting files:

    brew link --overwrite python

The result is that libvirt fails to find python3:

  checking for python3... no
  configure: error: 'python3' binary is required to build libvirt

It is unclear what changed in Travis/HomeBrew to break our
previously working setup, but running the suggested command
fixes it well enough for libvirt's CI needs.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agomaint: update to latest gnulib
Ján Tomko [Thu, 2 Jan 2020 08:51:05 +0000 (09:51 +0100)] 
maint: update to latest gnulib

Update to:

    commit 7d069378921bfa0d7c7198ea177aac0a2440016f
    Author:     Pádraig Brady <P@draigBrady.com>
    CommitDate: 2020-01-01 22:00:28 +0000

       md5, sha1, sha256, sha512: support --with-openssl=auto-gpl-compat

Signed-off-by: Ján Tomko <jtomko@redhat.com>
5 years agoschemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be...
Michal Privoznik [Fri, 20 Dec 2019 09:24:07 +0000 (10:24 +0100)] 
schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved

While command line arguments are sort of positional (because you
have to have two entries, one for "-arg" the other for "value"),
it doesn't really matter whether env variables come before or
after command line arguments.

And it matters even less when playing with qemu capabilities.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agoqemu: hide details of fake reboot
Nikolay Shirokovskiy [Thu, 19 Dec 2019 08:02:06 +0000 (11:02 +0300)] 
qemu: hide details of fake reboot

If we use fake reboot then domain goes thru running->shutdown->running
state changes with shutdown state only for short period of time.  At
least this is implementation details leaking into API. And also there is
one real case when this is not convinient. I'm doing a backup with the
help of temporary block snapshot (with the help of qemu's API which is
used in the newly created libvirt's backup API). If guest is shutdowned
I want to continue to backup so I don't kill the process and domain is
in shutdown state. Later when backup is finished I want to destroy qemu
process. So I check if it is in shutdowned state and destroy it if it
is. Now if instead of shutdown domain got fake reboot then I can destroy
process in the middle of fake reboot process.

After shutdown event we also get stop event and now as domain state is
running it will be transitioned to paused state and back to running
later. Though this is not critical for the described case I guess it is
better not to leak these details to user too. So let's leave domain in
running state on stop event if fake reboot is in process.

Reconnection code handles this patch without modification. It detects
that qemu is not running due to shutdown and then calls qemuProcessShutdownOrReboot
which reboots as fake reboot flag is set.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agoStorage: Use errno parameter in virReportSystemError
Yi Li [Mon, 23 Dec 2019 01:15:40 +0000 (09:15 +0800)] 
Storage: Use errno parameter in virReportSystemError

Use errno parameter in virReportSystemError.
Remove hold function return values if don't need.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Yi Li <yili@winhong.com>
5 years agostorage: Fix volStorageBackendRBDRefreshVolInfo function return errors
Yi Li [Mon, 23 Dec 2019 01:15:39 +0000 (09:15 +0800)] 
storage: Fix volStorageBackendRBDRefreshVolInfo function return errors

Fix the return value status comparison checking for call to
volStorageBackendRBDRefreshVolInfo introduced by commit id f46d137e.

we only should fail when the return is < 0. -ENOENT, -ETIMEDOUT will
ignore according commit id f46d137e.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Yi Li <yili@winhong.com>
5 years agoStorage: Use rc hold intermediate function return values.
Yi Li [Mon, 23 Dec 2019 01:15:38 +0000 (09:15 +0800)] 
Storage: Use rc hold intermediate function return values.

most libvirt code uses 'int rc' to hold intermediate
function return values. consistent with the rest of libvirt.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Yi Li <yili@winhong.com>
5 years agoqemu: store the emulator name in the capabilities XML
Daniel P. Berrangé [Tue, 10 Dec 2019 10:23:14 +0000 (10:23 +0000)] 
qemu: store the emulator name in the capabilities XML

We don't need this for any functional purpose, but when debugging hosts
it is useful to know what binary a given capabilities XML document is
associated with.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agoqemu: add qemu caps constructor which takes binary name
Daniel P. Berrangé [Fri, 20 Dec 2019 12:28:57 +0000 (12:28 +0000)] 
qemu: add qemu caps constructor which takes binary name

Simplify repeated code patterns by providing a new constructor taking
the QEMU binary name.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agoqemu: add explicit flag to skip qemu caps invalidation
Daniel P. Berrangé [Fri, 20 Dec 2019 11:56:38 +0000 (11:56 +0000)] 
qemu: add explicit flag to skip qemu caps invalidation

Currently if the binary path is NULL in the qemu capabilities object,
cache invalidation is skipped. A future patch will ensure that the
binary path is always non-NULL, so a way to explicitly skip invalidation
is required.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agodocs: ensure outputfile is deleted if rst2html/rst2man fail
Daniel P. Berrangé [Wed, 11 Dec 2019 18:03:53 +0000 (18:03 +0000)] 
docs: ensure outputfile is deleted if rst2html/rst2man fail

This avoids leaving a zero length or partially generated output
file on errors.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agodocs/auth.html.in: fixed typos
Andrew Miloradovsky [Thu, 19 Dec 2019 15:01:28 +0000 (18:01 +0300)] 
docs/auth.html.in: fixed typos

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrew Miloradovsky <andrew@interpretmath.pw>
5 years agostorage: Fix daemon crash on lookup storagepool by targetpath
Yi Li [Sat, 21 Dec 2019 00:33:33 +0000 (08:33 +0800)] 
storage: Fix daemon crash on lookup storagepool by targetpath

Causing a crash when storagePoolLookupByTargetPath beacuse of
Some types of storage pool have no target elements.
Use STREQ_NULLABLE instead of STREQ
Avoids segfaults when using NULL arguments.

Core was generated by `/usr/sbin/libvirtd'.
Program terminated with signal 11, Segmentation fault.
(gdb) bt
0  0x0000ffff9e951388 in strcmp () from /lib64/libc.so.6
1  0x0000ffff92103e9c in storagePoolLookupByTargetPathCallback (
    obj=0xffff7009aab0, opaque=0xffff801058b0) at storage/storage_driver.c:1649
2  0x0000ffff9f2c52a4 in virStoragePoolObjListSearchCb (
    payload=0xffff801058b0, name=<optimized out>, opaque=<optimized out>)
    at conf/virstorageobj.c:476
3  0x0000ffff9f1f2f7c in virHashSearch (ctable=0xffff800f4f60,
    iter=iter@entry=0xffff9f2c5278 <virStoragePoolObjListSearchCb>,
    data=data@entry=0xffff95af7488, name=name@entry=0x0) at util/virhash.c:696
4  0x0000ffff9f2c64f0 in virStoragePoolObjListSearch (pools=0xffff800f2ce0,
    searcher=searcher@entry=0xffff92103e68 <storagePoolLookupByTargetPathCallback>,
     opaque=<optimized out>) at conf/virstorageobj.c:505
5  0x0000ffff92101f54 in storagePoolLookupByTargetPath (conn=0xffff5c0009f0,
path=0xffff7009a850 "/vms/images") at storage/storage_driver.c:1672

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Yi Li <yili@winhong.com>
5 years agoqemu_process.c: remove 'cleanup' label from qemuProcessCreatePretendCmd()
Daniel Henrique Barboza [Fri, 20 Dec 2019 21:16:32 +0000 (18:16 -0300)] 
qemu_process.c: remove 'cleanup' label from qemuProcessCreatePretendCmd()

The 'cleanup' flag is doing no cleaup in this function. We can
remove it and return NULL on error or qemuBuildCommandLine().

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoqemu_process.c: remove cleanup labels after g_auto*() changes
Daniel Henrique Barboza [Fri, 20 Dec 2019 21:16:31 +0000 (18:16 -0300)] 
qemu_process.c: remove cleanup labels after g_auto*() changes

The g_auto*() changes made by the previous patches made a lot
of 'cleanup' labels obsolete. Let's remove them.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoqemu_process.c: use g_autoptr()
Daniel Henrique Barboza [Fri, 20 Dec 2019 21:16:30 +0000 (18:16 -0300)] 
qemu_process.c: use g_autoptr()

Change all feasible pointers to use g_autoptr().

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoqemu_domain.h: add G_DEFINE_AUTOPTR_CLEANUP_FUNC for qemuDomainLogContext
Daniel Henrique Barboza [Fri, 20 Dec 2019 21:16:29 +0000 (18:16 -0300)] 
qemu_domain.h: add G_DEFINE_AUTOPTR_CLEANUP_FUNC for qemuDomainLogContext

This will allow us to g_autoptr qemuDomainLogContext pointers
in the following patch.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoqemu_process.c: use g_autofree
Daniel Henrique Barboza [Fri, 20 Dec 2019 21:16:28 +0000 (18:16 -0300)] 
qemu_process.c: use g_autofree

Change all feasible strings and scalar pointers to use g_autofree.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agovbox: Get rid of "no_memory" labels
Fabiano Fidêncio [Fri, 20 Dec 2019 12:43:15 +0000 (13:43 +0100)] 
vbox: Get rid of "no_memory" labels

As pointed out by Ján Tomko, "no_memory seems suspicious in the times of
abort()".

As libvirt decided to take the path to not report OOM and simply abort
when it happens, let's get rid of the no_memory labels and simplify the
code around them.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
5 years agoutil: Get rid of "no_memory" labels
Fabiano Fidêncio [Fri, 20 Dec 2019 12:43:14 +0000 (13:43 +0100)] 
util: Get rid of "no_memory" labels

As pointed out by Ján Tomko, "no_memory seems suspicious in the times of
abort()".

As libvirt decided to take the path to not report OOM and simply abort
when it happens, let's get rid of the no_memory labels and simplify the
code around them.

Mind that virfirewall.c was not touched and still contains no_memory
labels. The reason those are left behind, at least for now, is because
the conversion seems to be slightly more complicated than the rest, as
some other places are relying on firewall->err being set to ENOMEM.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
5 years agorpc: Get rid of "no_memory" labels
Fabiano Fidêncio [Fri, 20 Dec 2019 12:43:13 +0000 (13:43 +0100)] 
rpc: Get rid of "no_memory" labels

As pointed out by Ján Tomko, "no_memory seems suspicious in the times of
abort()".

As libvirt decided to take the path to not report OOM and simply abort
when it happens, let's get rid of the no_memory labels and simplify the
code around them.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
5 years agoopenvz: Get rid of "no_memory" labels
Fabiano Fidêncio [Fri, 20 Dec 2019 12:43:12 +0000 (13:43 +0100)] 
openvz: Get rid of "no_memory" labels

As pointed out by Ján Tomko, "no_memory seems suspicious in the times of
abort()".

As libvirt decided to take the path to not report OOM and simply abort
when it happens, let's get rid of the no_memory labels and simplify the
code around them.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
5 years agoconf: Get rid of "no_memory" labels
Fabiano Fidêncio [Fri, 20 Dec 2019 12:43:11 +0000 (13:43 +0100)] 
conf: Get rid of "no_memory" labels

As pointed out by Ján Tomko, "no_memory seems suspicious in the times of
abort()".

As libvirt decided to take the path to not report OOM and simply abort
when it happens, let's get rid of the no_memory labels and simplify the
code around them.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
5 years agonews: document phyp removal
Cole Robinson [Fri, 20 Dec 2019 18:03:22 +0000 (13:03 -0500)] 
news: document phyp removal

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
5 years agoRemove phyp driver
Cole Robinson [Wed, 18 Dec 2019 15:23:34 +0000 (10:23 -0500)] 
Remove phyp driver

The phyp driver was added in 2009 and does not appear to have had any
real feature change since 2011. There's virtually no evidence online
of users actually using it. IMO it's time to kill it.

This was discussed a bit in April 2016:
https://www.redhat.com/archives/libvir-list/2016-April/msg01060.html

Final discussion is here:
https://www.redhat.com/archives/libvir-list/2019-December/msg01162.html

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
5 years agodocs: rewrite polkit docs generator in Python
Daniel P. Berrangé [Fri, 30 Aug 2019 12:22:54 +0000 (13:22 +0100)] 
docs: rewrite polkit docs generator in Python

As part of a goal to eliminate Perl from libvirt build tools,
rewrite the genaclperms.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agodocs: rewrite hvsupport.html page generator in python
Daniel P. Berrangé [Fri, 30 Aug 2019 12:22:54 +0000 (13:22 +0100)] 
docs: rewrite hvsupport.html page generator in python

As part of a goal to eliminate Perl from libvirt build tools,
rewrite the hvsupport.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

The new impl generates byte-for-byte identical output to the
old impl.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agotests: rewrite file access checker in Python
Daniel P. Berrangé [Fri, 30 Aug 2019 12:22:54 +0000 (13:22 +0100)] 
tests: rewrite file access checker in Python

As part of a goal to eliminate Perl from libvirt build tools,
rewrite the check-file-access.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agotests: rewrite qemu capability grouper in Python
Daniel P. Berrangé [Fri, 30 Aug 2019 12:22:54 +0000 (13:22 +0100)] 
tests: rewrite qemu capability grouper in Python

As part of a goal to eliminate Perl from libvirt build tools,
rewrite the group-qemu-caps.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agoesx: set vmfs fs type for vmfs-based datastores
Pino Toscano [Fri, 15 Nov 2019 11:51:51 +0000 (12:51 +0100)] 
esx: set vmfs fs type for vmfs-based datastores

This way they are correctly represented:
  <source>
    <format type='vmfs'/>
  </source>
... instead of 'auto'.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agostorage: add vmfs filesystem type
Pino Toscano [Fri, 15 Nov 2019 11:45:19 +0000 (12:45 +0100)] 
storage: add vmfs filesystem type

It will be used to represent the type of a filesystem pool in ESXi.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agoesx: split virtualswitchToNetwork helper
Pino Toscano [Thu, 14 Nov 2019 10:19:13 +0000 (11:19 +0100)] 
esx: split virtualswitchToNetwork helper

Move the creation of a virNetworkPtr object from the
esxVI_HostVirtualSwitch object of a virtual switch out of
esxNetworkLookupByName in an own helper. This way it can be used also
in other functions.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agoesx: split targetToStoragePool helper
Pino Toscano [Tue, 12 Nov 2019 17:16:48 +0000 (18:16 +0100)] 
esx: split targetToStoragePool helper

Move the creation of a virStoragePtr object from the
esxVI_HostInternetScsiHbaStaticTarget object of a target out of
esxStoragePoolLookupByName in an own helper. This way it can be used
also in other functions.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoesx: split datastorePoolType helper
Pino Toscano [Tue, 12 Nov 2019 13:39:32 +0000 (14:39 +0100)] 
esx: split datastorePoolType helper

Move the detection of the type of a vmfs pool out of
esxLookupVMFSStoragePoolType in an own helper. This way it can be used
also in other functions.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoesx: split datastoreToStoragePoolPtr helper
Pino Toscano [Mon, 11 Nov 2019 15:34:34 +0000 (16:34 +0100)] 
esx: split datastoreToStoragePoolPtr helper

Move the creation of a virStoragePtr object from the esxVI_ObjectContent
object of a datastore out of esxStoragePoolLookupByName in an own
helper. This way it can be used also in other functions.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoadmin: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:41:33 +0000 (10:41 +0100)] 
admin: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoadmin: Use g_autofree in getSocketPath()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:40:37 +0000 (10:40 +0100)] 
admin: Use g_autofree in getSocketPath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agointerface: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:39:32 +0000 (10:39 +0100)] 
interface: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agolocking: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:38:37 +0000 (10:38 +0100)] 
locking: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agolocking: Use g_autofree in virLockDaemonExecRestartStatePath()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:37:20 +0000 (10:37 +0100)] 
locking: Use g_autofree in virLockDaemonExecRestartStatePath()

Together with the change, let's also simplify the function and get rid
of the goto.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agolocking: Use g_autofree in virLockDaemonUnixSocketPaths()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:35:57 +0000 (10:35 +0100)] 
locking: Use g_autofree in virLockDaemonUnixSocketPaths()

Together with the change, let's also simplify the function and get rid
of the goto.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agolocking: Use g_autofree in virLockManagerLockDaemonPath()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:34:16 +0000 (10:34 +0100)] 
locking: Use g_autofree in virLockManagerLockDaemonPath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agologging: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:29:28 +0000 (10:29 +0100)] 
logging: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agologging: Use g_autofree in virLogDaemonExecRestartStatePath()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:31:39 +0000 (10:31 +0100)] 
logging: Use g_autofree in virLogDaemonExecRestartStatePath()

Together with the change, let's also simplify the function and get rid
of the goto.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agologging: Use g_autofree in virLogDaemonUnixSocketPaths()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:30:34 +0000 (10:30 +0100)] 
logging: Use g_autofree in virLogDaemonUnixSocketPaths()

Together with the change, let's also simplify the function and get rid
of the goto.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agologging: Use g_autofree in virLogManagerDaemonPath()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:29:01 +0000 (10:29 +0100)] 
logging: Use g_autofree in virLogManagerDaemonPath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agonetwork: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:27:49 +0000 (10:27 +0100)] 
network: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agonode_device: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:23:14 +0000 (10:23 +0100)] 
node_device: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoqemu: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:22:16 +0000 (10:22 +0100)] 
qemu: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoremote: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:21:40 +0000 (10:21 +0100)] 
remote: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agorpc: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:19:25 +0000 (10:19 +0100)] 
rpc: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agosecret: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:18:31 +0000 (10:18 +0100)] 
secret: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agostorage: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:17:11 +0000 (10:17 +0100)] 
storage: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoutil: Don't check the output of virGetUserRuntimeDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:16:21 +0000 (10:16 +0100)] 
util: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agolocking: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:43:51 +0000 (09:43 +0100)] 
locking: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agolocking: Use g_autofree in virLockDaemonConfigFilePath()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:42:57 +0000 (09:42 +0100)] 
locking: Use g_autofree in virLockDaemonConfigFilePath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agologging: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:41:45 +0000 (09:41 +0100)] 
logging: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agologging: Use g_autofree in virLogDaemonConfigFilePath()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:41:11 +0000 (09:41 +0100)] 
logging: Use g_autofree in virLogDaemonConfigFilePath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agonetwork: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:27:05 +0000 (10:27 +0100)] 
network: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoqemu: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:39:26 +0000 (09:39 +0100)] 
qemu: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoremote: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:38:30 +0000 (09:38 +0100)] 
remote: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoremote: Use g_autofree in daemonConfigFilePath()
Fabiano Fidêncio [Thu, 19 Dec 2019 22:47:30 +0000 (23:47 +0100)] 
remote: Use g_autofree in daemonConfigFilePath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agorpc: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:37:51 +0000 (09:37 +0100)] 
rpc: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoqemu: Don't check the output of virGetUserCacheDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:14:31 +0000 (10:14 +0100)] 
qemu: Don't check the output of virGetUserCacheDirectory()

virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoutil: Don't check the output of virGetUserCacheDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:12:56 +0000 (10:12 +0100)] 
util: Don't check the output of virGetUserCacheDirectory()

virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoutil: Use g_autofree in virLogSetDefaultOutputToFile()
Fabiano Fidêncio [Thu, 19 Dec 2019 09:11:49 +0000 (10:11 +0100)] 
util: Use g_autofree in virLogSetDefaultOutputToFile()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agovbox: Don't check the output of virGetUserCacheDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:50:34 +0000 (09:50 +0100)] 
vbox: Don't check the output of virGetUserCacheDirectory()

virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agovbox: Use g_autofree in vboxDomainScreenshot()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:48:05 +0000 (09:48 +0100)] 
vbox: Use g_autofree in vboxDomainScreenshot()

This also fixes a cacheDir's leak when g_mkstep_full() fails.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agotools: Don't check the output of virGetUserCacheDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:45:52 +0000 (09:45 +0100)] 
tools: Don't check the output of virGetUserCacheDirectory()

virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agosecret: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:44:40 +0000 (09:44 +0100)] 
secret: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agostorage: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:36:22 +0000 (09:36 +0100)] 
storage: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoutil: Don't check the output of virGetUserConfigDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:33:54 +0000 (09:33 +0100)] 
util: Don't check the output of virGetUserConfigDirectory()

virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoutil: Use g_autofree in virConfLoadConfigPath()
Fabiano Fidêncio [Thu, 19 Dec 2019 17:30:33 +0000 (18:30 +0100)] 
util: Use g_autofree in virConfLoadConfigPath()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoqemu: Don't check the output of virGetUserDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:32:11 +0000 (09:32 +0100)] 
qemu: Don't check the output of virGetUserDirectory()

virGetUserDirectory() *never* *ever* returns NULL, making the checks for
it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agorpc: Don't check the output of virGetUserDirectory()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:23:58 +0000 (09:23 +0100)] 
rpc: Don't check the output of virGetUserDirectory()

virGetUserDirectory() *never* *ever* returns NULL, making the checks for
it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agorpc: Use g_autofree in virNetClientNewLibssh()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:22:16 +0000 (09:22 +0100)] 
rpc: Use g_autofree in virNetClientNewLibssh()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agorpc: Use g_autofree in virNetClientNewLibSSH2()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:21:10 +0000 (09:21 +0100)] 
rpc: Use g_autofree in virNetClientNewLibSSH2()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agovbox: Don't leak virGetUserDirectory()'s output
Fabiano Fidêncio [Thu, 19 Dec 2019 08:13:00 +0000 (09:13 +0100)] 
vbox: Don't leak virGetUserDirectory()'s output

On vboxStorageVolCreateXML(), virGetUserDirectory() was called without
freeing its content later on.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agotools: Use g_autofree in cmdCd()
Fabiano Fidêncio [Thu, 19 Dec 2019 08:09:02 +0000 (09:09 +0100)] 
tools: Use g_autofree in cmdCd()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agoAUTHORS: Add Fabiano Fidêncio
Ján Tomko [Mon, 16 Jul 2018 14:31:53 +0000 (16:31 +0200)] 
AUTHORS: Add Fabiano Fidêncio

$ git log --committer=fidencio --pretty=oneline | wc -l
12

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
5 years agovirsh: Adjust logic checks in virshUpdateDiskXML
John Ferlan [Tue, 17 Dec 2019 15:43:24 +0000 (10:43 -0500)] 
virsh: Adjust logic checks in virshUpdateDiskXML

Make it clearer that what we're trying to do is find @source and
@target_node so that the unattentive or code analysis utility
doesn't believe 'source' and 'target' could be found in the same
node element.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agovbox: Reset @ret after xmlFreeNode
John Ferlan [Mon, 16 Dec 2019 12:36:32 +0000 (07:36 -0500)] 
vbox: Reset @ret after xmlFreeNode

In the error path, if we xmlFreeNode @ret, then the return ret;
a few lines later returns something that's already been free'd
and could be reused, so let's reinit it.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoconf: Fix ATTRIBUTE_NONNULL usages
John Ferlan [Sat, 14 Dec 2019 15:37:57 +0000 (10:37 -0500)] 
conf: Fix ATTRIBUTE_NONNULL usages

Recent changes removed the virCapsPtr, but didn't adjust/remove the
corresponding ATTRIBUTE_NONNULL resulting in a build failure to build
in my Coverity environment.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: Remove VIR_FILE_*_SEPARATOR*
Fabiano Fidêncio [Wed, 18 Dec 2019 20:13:16 +0000 (21:13 +0100)] 
util: Remove VIR_FILE_*_SEPARATOR*

None of those are used and we should prefer using the ones provided by
GLib, as G_DIR_SEPARATOR, G_DIR_SEPARATOR_S, G_SEARCHPATH_SEPARATOR, and
G_SEARCHPATH_SEPARATOR_S.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agoutil: Use G_DIR_SEPARATOR instead of VIR_FILE_DIR_SEPARATOR
Fabiano Fidêncio [Wed, 18 Dec 2019 20:11:43 +0000 (21:11 +0100)] 
util: Use G_DIR_SEPARATOR instead of VIR_FILE_DIR_SEPARATOR

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agoutil: Remove VIR_FILE_IS_DIR_SEPARATOR
Fabiano Fidêncio [Wed, 18 Dec 2019 19:45:50 +0000 (20:45 +0100)] 
util: Remove VIR_FILE_IS_DIR_SEPARATOR

The define is not used since virFileIsAbsPath() has been dropped.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoutil: Remove virFileIsAbsPath()
Fabiano Fidêncio [Wed, 18 Dec 2019 19:43:25 +0000 (20:43 +0100)] 
util: Remove virFileIsAbsPath()

The function is no longer used since commit faf2d811f3e9a4.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoutil: Remove virFileSkipRoot()
Fabiano Fidêncio [Wed, 18 Dec 2019 19:40:39 +0000 (20:40 +0100)] 
util: Remove virFileSkipRoot()

The function is no longer used since commit faf2d811f3e9a4.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agodocs: Only distribute sanlock manpage if WITH_SANLOCK
Cole Robinson [Wed, 18 Dec 2019 19:46:16 +0000 (14:46 -0500)] 
docs: Only distribute sanlock manpage if WITH_SANLOCK

This fixes mingw-libvirt RPM build

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
5 years agoutil: Simplify Windows version of virGetUserDirectoryByUID()
Fabiano Fidêncio [Tue, 17 Dec 2019 21:44:12 +0000 (22:44 +0100)] 
util: Simplify Windows version of virGetUserDirectoryByUID()

Let's just use the plain g_get_home_dir(), from GLib, instead of
maintaining a code adapted from the GLib's one.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
5 years agonews.xml: add address type='unassigned' entry
Daniel Henrique Barboza [Tue, 17 Dec 2019 20:35:05 +0000 (17:35 -0300)] 
news.xml: add address type='unassigned' entry

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoformatdomain.html.in: document <address type='unassigned'/>
Daniel Henrique Barboza [Tue, 17 Dec 2019 20:35:04 +0000 (17:35 -0300)] 
formatdomain.html.in: document <address type='unassigned'/>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoqemu: handle unassigned PCI hostdevs in command line
Daniel Henrique Barboza [Tue, 17 Dec 2019 20:35:03 +0000 (17:35 -0300)] 
qemu: handle unassigned PCI hostdevs in command line

Previous patch made it possible for the QEMU driver to check if
a given PCI hostdev is unassigned, by checking if dev->info->type is
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED, meaning that this device
shouldn't be part of the actual guest launch.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoIntroducing new address type='unassigned' for PCI hostdevs
Daniel Henrique Barboza [Tue, 17 Dec 2019 20:35:02 +0000 (17:35 -0300)] 
Introducing new address type='unassigned' for PCI hostdevs

This patch introduces a new PCI hostdev address type called
'unassigned'. This new type gives users the option to add
PCI hostdevs to the domain XML in an 'unassigned' state, meaning
that the device exists in the domain, is managed by Libvirt
like any regular PCI hostdev, but the guest does not have
access to it.

This adds extra options for managing PCI device binding
inside Libvirt, for example, making all the managed PCI hostdevs
declared in the domain XML to be detached from the host and bind
to the chosen driver and, at the same time, allowing just a
subset of these devices to be usable by the guest.

Next patch will use this new address type in the QEMU driver to
avoid adding unassigned devices to the QEMU launch command line.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agoqemu: command: move validation of vmcoreinfo to qemu_domain.c
Daniel Henrique Barboza [Wed, 18 Dec 2019 00:36:03 +0000 (21:36 -0300)] 
qemu: command: move validation of vmcoreinfo to qemu_domain.c

Move the validation of vmcoreinfo from qemuBuildVMCoreInfoCommandLine()
to qemuDomainDefValidateFeatures(), allowing for validation
at domain define time.

qemuxml2xmltest.c was changed to account for this caps being
now validated at this earlier stage.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>