]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
5 years agoconf: use g_strdup instead of VIR_STRDUP
Ján Tomko [Sun, 20 Oct 2019 11:49:46 +0000 (13:49 +0200)]
conf: use g_strdup instead of VIR_STRDUP

Replace all occurrences of
  if (VIR_STRDUP(a, b) < 0)
     /* effectively dead code */
with:
  a = g_strdup(b);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agobhyve: use g_strdup instead of VIR_STRDUP
Ján Tomko [Sun, 20 Oct 2019 11:49:46 +0000 (13:49 +0200)]
bhyve: use g_strdup instead of VIR_STRDUP

Replace all occurrences of
  if (VIR_STRDUP(a, b) < 0)
     /* effectively dead code */
with:
  a = g_strdup(b);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_strdup to fill in default values
Ján Tomko [Fri, 18 Oct 2019 13:08:21 +0000 (15:08 +0200)]
Use g_strdup to fill in default values

Replace:
  if (!s && VIR_STRDUP(s, str) < 0)
    goto;
with:
  if (!s)
    s = g_strdup(str);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_strdup where VIR_STRDUP's return value was propagated
Ján Tomko [Sun, 20 Oct 2019 10:55:05 +0000 (12:55 +0200)]
Use g_strdup where VIR_STRDUP's return value was propagated

All the callers of these functions only check for a negative
return value.

However, virNetDevOpenvswitchGetVhostuserIfname is documented
as returning 1 for openvswitch interfaces so preserve that.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agodrivers: use g_strdup in probe functions
Ján Tomko [Sun, 20 Oct 2019 10:41:35 +0000 (12:41 +0200)]
drivers: use g_strdup in probe functions

The callers expect '1' on a successful probe,
so return 1 just like VIR_STRDUP would.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_strdup instead of ignoring VIR_STRDUP_QUIET's value
Ján Tomko [Fri, 18 Oct 2019 11:27:03 +0000 (13:27 +0200)]
Use g_strdup instead of ignoring VIR_STRDUP_QUIET's value

Replace all the occurrences of
  ignore_value(VIR_STRDUP_QUIET(a, b));
with
  a = g_strdup(b);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_strdup instead of ignoring VIR_STRDUP's value
Ján Tomko [Fri, 18 Oct 2019 11:27:03 +0000 (13:27 +0200)]
Use g_strdup instead of ignoring VIR_STRDUP's value

Replace all the occurrences of
  ignore_value(VIR_STRDUP(a, b));
with
  a = g_strdup(b);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoconf: use g_strdup in virDomainDiskSet
Ján Tomko [Sat, 19 Oct 2019 16:41:29 +0000 (18:41 +0200)]
conf: use g_strdup in virDomainDiskSet

Use a temporary variable to allow copying from the
currently set source.

Always return 0 since none of the callers distinguishes
between 0 and 1 propagated from VIR_STRDUP.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: fix check for iscsi initiator copy
Ján Tomko [Sun, 20 Oct 2019 10:37:05 +0000 (12:37 +0200)]
util: fix check for iscsi initiator copy

virStorageSourceInitiatorCopy propagates the return
value from VIR_STRDUP, which returns 1 on a successful
copy.

Only error out on < 0, not non-zero values.

Fixes: 9ea3fdc6e90a96e3d7d7aeb9867e8f0a3992b7c6
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoscripts: introduce a macro file for coccinelle
Ján Tomko [Sat, 19 Oct 2019 00:22:34 +0000 (02:22 +0200)]
scripts: introduce a macro file for coccinelle

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu: fix CPU model error probing capabilities for ppc
Daniel P. Berrangé [Fri, 18 Oct 2019 18:20:43 +0000 (19:20 +0100)]
qemu: fix CPU model error probing capabilities for ppc

The CPU driver only supports CPU models for PPC64 architecture, not
plain PPC.

  Failed to probe capabilities for /usr/bin/qemu-system-ppc:
  this function is not supported by the connection driver:
  'ppc' architecture is not supported by CPU driver

This fixes a bug in

  commit db873ab3bc5f6fbd7d227727a62ccfee3d1c3e9d
  Author: Jiri Denemark <jdenemar@redhat.com>
  Date:   Thu May 17 17:08:42 2018 +0200

    qemu: Adapt to changed ppc64 CPU model names

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agogitdm: Add other emails into IBM company
Julio Faracco [Sun, 20 Oct 2019 03:49:08 +0000 (00:49 -0300)]
gitdm: Add other emails into IBM company

Some people from IBM does not use 'ibm.com' domain emails.
They use personal or other domains.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
5 years agovsh: mark ctl as unused in vshReadline
Ján Tomko [Mon, 21 Oct 2019 09:11:04 +0000 (11:11 +0200)]
vsh: mark ctl as unused in vshReadline

My commit removed the last use in the version for platforms
without readline.

Fixes: c937c1d23db00cf0f33091f9d30f7ac33d9d6aa4
Signed-off-by: Ján Tomko <jtomko@redhat.com>
5 years agotools: delete vshStrdup
Ján Tomko [Fri, 18 Oct 2019 13:54:06 +0000 (15:54 +0200)]
tools: delete vshStrdup

Now that we use g_strdup everywhere, delete vshStrdup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agotools: prefer g_strdup to vshStrdup
Ján Tomko [Fri, 18 Oct 2019 15:24:02 +0000 (17:24 +0200)]
tools: prefer g_strdup to vshStrdup

Remove all the uses of vshStrdup in favor of GLib's g_strdup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agotools: vshCommandArgvGetArg: prefer g_strdup
Ján Tomko [Fri, 18 Oct 2019 22:12:53 +0000 (00:12 +0200)]
tools: vshCommandArgvGetArg: prefer g_strdup

Remove the use of vshStrdup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agotools: vshCommandArgvGetArg: one parameter per line
Ján Tomko [Fri, 18 Oct 2019 22:12:53 +0000 (00:12 +0200)]
tools: vshCommandArgvGetArg: one parameter per line

Split the parameters to make changes more readable.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agovirsh: getSignalNumber: use g_strdup
Ján Tomko [Fri, 18 Oct 2019 21:35:27 +0000 (23:35 +0200)]
virsh: getSignalNumber: use g_strdup

Eliminate the use of vshStrdup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agovirsh: getSignalNumber: use g_autofree
Ján Tomko [Fri, 18 Oct 2019 21:32:12 +0000 (23:32 +0200)]
virsh: getSignalNumber: use g_autofree

Mark the 'str' variable as g_autofree and avoid the need for
a separate cleanup label.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agovirsh: getSignalNumber: rename variables
Ján Tomko [Fri, 18 Oct 2019 21:30:27 +0000 (23:30 +0200)]
virsh: getSignalNumber: rename variables

Use 'str' for the allocated copy of the string and 'p'
for the pointer into that string.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agovirsh: use g_strdup in virshDomainGetEditMetadata
Ján Tomko [Fri, 18 Oct 2019 15:24:29 +0000 (17:24 +0200)]
virsh: use g_strdup in virshDomainGetEditMetadata

Prefer GLib's g_strdup to vshStrdup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agovirsh: use g_strdup in cmdDomblkinfoGet
Ján Tomko [Fri, 18 Oct 2019 15:24:29 +0000 (17:24 +0200)]
virsh: use g_strdup in cmdDomblkinfoGet

Prefer GLib's g_strdup to vshStrdup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agotools: cmdDomblkinfoGet: reindent parameters
Ján Tomko [Fri, 18 Oct 2019 22:15:34 +0000 (00:15 +0200)]
tools: cmdDomblkinfoGet: reindent parameters

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
5 years agonetwork: allow DHCP/DNS/TFTP explicitly in OUTPUT rules
Malina Salina [Fri, 27 Sep 2019 16:10:34 +0000 (17:10 +0100)]
network: allow DHCP/DNS/TFTP explicitly in OUTPUT rules

While the default iptables setup used by Fedora/RHEL distros
only restricts traffic on the INPUT and/or FORWARD rules,
some users might have custom firewalls that restrict the
OUTPUT rules too.

These can prevent DHCP/DNS/TFTP responses from dnsmasq
from reaching the guest VMs. We should thus whitelist
these protocols in the OUTPUT chain, as well as the
INPUT chain.

Signed-off-by: Malina Salina <malina.salina@protonmail.com>
Initial patch then modified to add unit tests and IPv6
support

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agogitdm: add 'ibm' file
Daniel Henrique Barboza [Fri, 18 Oct 2019 14:40:37 +0000 (11:40 -0300)]
gitdm: add 'ibm' file

Some people from IBM does not use 'ibm.com' domain emails.

Suggested-by: Leonardo Augusto Guimarães Garcia <lagarcia@br.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
5 years agoutil: drop logging filter/output flags
Daniel P. Berrangé [Wed, 2 Oct 2019 10:51:51 +0000 (11:51 +0100)]
util: drop logging filter/output flags

With the removal of support for log message stack traces, there is
nothing using the logging filter/output flags and they can be removed.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agoutil: drop support for stack traces with logging
Daniel P. Berrangé [Wed, 2 Oct 2019 10:51:51 +0000 (11:51 +0100)]
util: drop support for stack traces with logging

The log filters have supported the use of a "+" before the source match
string to request that a stack trace be emitted for every log message:

  commit 548563956e484e0e43e9a66a89bdda0f95930108
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Wed May 9 15:18:56 2012 +0100

    Allow stack traces to be included with log messages

    Sometimes it is useful to see the callpath for log messages.
    This change enhances the log filter syntax so that stack traces
    can be show by setting '1:+NAME' instead of '1:NAME'.

With the huge & ever increasing number of logging statements per file,
this will be incredibly verbose and have a major performance penalty.
This makes the feature impractical to use widely and as such it is not
worth the code maint cost.

Removing this seldom used feature allows us to drop the 'execinfo'
module in gnulib which provides the backtrace() function which doesn't
exist on non-Linux.

Users who want to get stack traces of parts of libvirt can use GDB,
or systemtap for live tracing with minimal perf impact.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agoutil: add stdlib.h include for abort() prototype
Daniel P. Berrangé [Fri, 18 Oct 2019 14:43:39 +0000 (15:43 +0100)]
util: add stdlib.h include for abort() prototype

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agoglibcompat: Reimplement g_strdup_printf() and g_strdup_vprintf()
Michal Privoznik [Thu, 17 Oct 2019 15:17:01 +0000 (17:17 +0200)]
glibcompat: Reimplement g_strdup_printf() and g_strdup_vprintf()

These functions don't really abort() on OOM. The fix was merged
upstream, but not in the minimal version we require. Provide our
own implementation which can be removed once we bump the minimal
version.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agobuild-aux: rewrite po file minimizer in Python
Daniel P. Berrangé [Fri, 30 Aug 2019 12:22:54 +0000 (13:22 +0100)]
build-aux: rewrite po file minimizer in Python

As part of an goal to eliminate Perl from libvirt build tools,
rewrite the minimize-po.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: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agobuild-aux: rewrite augeas test generator in Python
Daniel P. Berrangé [Fri, 30 Aug 2019 12:22:54 +0000 (13:22 +0100)]
build-aux: rewrite augeas test generator in Python

As part of an goal to eliminate Perl from libvirt build tools,
rewrite the augeas-gentest.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 use of $(AUG_GENTEST) as a dependancy in the makefiles needed
to be fixed, because this was assumed to be the filename of the
script, but is in fact a full shell command line.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agobuild: fix use of $(AUG_GENTEST) as a dependency
Daniel P. Berrangé [Fri, 27 Sep 2019 13:17:54 +0000 (14:17 +0100)]
build: fix use of $(AUG_GENTEST) as a dependency

The use of $(AUG_GENTEST) as a dependency in the makefiles is
a problem because this was assumed to be the filename of the
script, but is in fact a full shell command line.

Split it into two variables, so it can be correctly used for
dependencies.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agopo: refresh translations from zanata
Daniel P. Berrangé [Fri, 18 Oct 2019 12:48:07 +0000 (13:48 +0100)]
po: refresh translations from zanata

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 years agom4: Don't suggest attribute malloc
Michal Privoznik [Fri, 18 Oct 2019 08:07:50 +0000 (10:07 +0200)]
m4: Don't suggest attribute malloc

With glib inclusion, some of its functions have
__attribute__((__malloc__)) which make compiler realize we want
to use the same attribute for some trivial functions of ours. For
instance qemuDomainManagedSavePath(). I don't see any real
benefit into using the attribute, so disable that suggestion.

In fact, wrong use of the attribute may lead to mysterious bugs:

  https://gitlab.gnome.org/GNOME/glib/issues/1465

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
5 years agoqemu: Generate 'xres' and 'yres' for QEMU video devices
Julio Faracco [Thu, 17 Oct 2019 04:30:32 +0000 (01:30 -0300)]
qemu: Generate 'xres' and 'yres' for QEMU video devices

This commit let QEMU command line define 'xres' and 'yres' properties
if XML contains both properties from video model: based on resolution
fields 'x' and 'y'. There is a conditional structure inside
qemuDomainDeviceDefValidateVideo() that validates if video model
supports this feature. This commit includes the necessary changes to
cover resolution for 'video-qxl-resolution' test cases too.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
5 years agoconf: Add 'x' and 'y' resolution into video XML definition
Julio Faracco [Thu, 17 Oct 2019 04:30:31 +0000 (01:30 -0300)]
conf: Add 'x' and 'y' resolution into video XML definition

This commit adds resolution element with parameters 'x' and 'y' into video
XML domain group definition. Both, properties were added into an element
called 'resolution' and it was added inside 'model' element. They are set
as optional. This element does not follow QEMU properties 'xres' and
'yres' format. Both HTML documentation and schema were changed too. This
commit includes a simple test case to cover resolution for QEMU video
models. The new XML format for resolution looks like:

    <model ...>
      <resolution x='800' y='600'/>
    </model>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
5 years agoqemu: caps: Use unique key for domCaps caching
Cole Robinson [Tue, 15 Oct 2019 15:47:10 +0000 (11:47 -0400)]
qemu: caps: Use unique key for domCaps caching

When searching qemuCaps->domCapsCache for existing domCaps data,
we check for a matching pair of arch+virttype+machine+emulator. However
for the hash table key we only use the machine string. So if the
cache already contains:

  x86_64 + kvm + pc + /usr/bin/qemu-kvm

But a new VM is defined with

  x86_64 + qemu + pc + /usr/bin/qemu-kvm

We correctly fail to find matching cached domCaps, but then attempt
to use a colliding key with virHashAddEntry

Fix this by building a hash key from the 4 values, not just machine

Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
5 years agoqemu_driver.c: use g_strdup_printf
Daniel Henrique Barboza [Wed, 16 Oct 2019 20:54:33 +0000 (17:54 -0300)]
qemu_driver.c: use g_strdup_printf

This patch changes all virAsprintf calls to use the GLib API
g_strdup_printf in qemu_driver.c

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu_driver.c: remove unused 'cleanup' labels after g_auto*() changes
Daniel Henrique Barboza [Wed, 16 Oct 2019 20:54:32 +0000 (17:54 -0300)]
qemu_driver.c: remove unused '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.

Suggested-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu_driver.c: use g_autofree when possible
Daniel Henrique Barboza [Wed, 16 Oct 2019 20:54:31 +0000 (17:54 -0300)]
qemu_driver.c: use g_autofree when possible

String and other scalar pointers an be auto-unref, sparing us
a VIR_FREE() call.

This patch uses g_autofree whenever possible with strings and
other scalar pointer types.

Suggested-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu_driver.c: use g_autoptr() when possible
Daniel Henrique Barboza [Wed, 16 Oct 2019 20:54:30 +0000 (17:54 -0300)]
qemu_driver.c: use g_autoptr() when possible

Several pointer types can be auto-unref for the great majority
of the uses made in qemu_driver, sparing us a virObjectUnref()
call.

This patch uses g_autoptr() in the following pointer types inside
qemu_driver.c, whenever possible:

- qemuBlockJobDataPtr
- virCapsPtr
- virConnect
- virDomainCapsPtr
- virNetworkPtr
- virQEMUDriverConfigPtr

Suggested-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu_driver.c: use g_auto* in some functions
Daniel Henrique Barboza [Wed, 16 Oct 2019 20:54:29 +0000 (17:54 -0300)]
qemu_driver.c: use g_auto* in some functions

This patch changes qemuDomainSnapshotLoad, qemuDomainCheckpointLoad and
qemuStateInitialize to use g_autoptr() and g_autofree, cleaning up
some virObjectUnref() and VIR_FREE() calls on each.

The reason this is being sent separately is because these are not
trivial search/replace cases. In all these functions some strings
declarations are moved inside local loops, where they are in fact
used, allowing us to erase VIR_FREE() calls that were made inside
the loop and in 'cleanup' labels.

Following patches with tackle more trivial cases of g_auto* usage
in all qemu_driver.c file.

Suggested-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agodocs: hacking: add a conversion table for removed libvirt macros
Ján Tomko [Wed, 16 Oct 2019 14:11:30 +0000 (16:11 +0200)]
docs: hacking: add a conversion table for removed libvirt macros

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agodocs: hacking: use <code> for functions/names
Ján Tomko [Wed, 16 Oct 2019 12:43:49 +0000 (14:43 +0200)]
docs: hacking: use <code> for functions/names

Use the <code> element more in the GLib section.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agodocs: hacking: separate section about already deleted macros
Ján Tomko [Wed, 16 Oct 2019 13:58:28 +0000 (15:58 +0200)]
docs: hacking: separate section about already deleted macros

Move the recently deleted libvirt macros into a separate section.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agostorage: fix build with musl libc
Carlos Santos [Wed, 16 Oct 2019 11:22:14 +0000 (08:22 -0300)]
storage: fix build with musl libc

On musl _PATH_MOUNTED is defined in paths.h, not in mntent.h, which
causes compilation errors:

storage/storage_backend_fs.c: In function 'virStorageBackendFileSystemIsMounted':
storage/storage_backend_fs.c:255:23: error: '_PATH_MOUNTED' undeclared (first use in this function); did you mean 'XPATH_POINT'?
     if ((mtab = fopen(_PATH_MOUNTED, "r")) == NULL) {
                       ^~~~~~~~~~~~~
                       XPATH_POINT

Fix this including paths.h if _PATH_MOUNTED is still not defined after
including mntent.h. This also works with glibc and uClibc-ng.

Signed-off-by: Carlos Santos <casantos@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu: fix build with musl libc
Carlos Santos [Wed, 16 Oct 2019 11:22:13 +0000 (08:22 -0300)]
qemu: fix build with musl libc

On musl libc "stderr" is a preprocessor macro whose expansion leads to
compilation errors:

In file included from qemu/qemu_process.c:66:
qemu/qemu_process.c: In function 'qemuProcessQMPFree':
qemu/qemu_process.c:8418:21: error: expected identifier before '(' token
     VIR_FREE((proc->stderr));
                     ^~~~~~

Prevent this by renaming the homonymous field in the _qemuProcessQMP
struct to "stdErr".

Signed-off-by: Carlos Santos <casantos@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu: remove unused cfg variables
Ján Tomko [Thu, 17 Oct 2019 07:57:03 +0000 (09:57 +0200)]
qemu: remove unused cfg variables

These functions got a reference to the driver config
without actually using it:
  processNicRxFilterChangedEvent
  qemuConnectDomainXMLToNative

Signed-off-by: Ján Tomko <jtomko@redhat.com>
5 years agotools: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:33:57 +0000 (12:33 -0500)]
tools: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agovz: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:33:49 +0000 (12:33 -0500)]
vz: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:33:39 +0000 (12:33 -0500)]
util: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agostorage: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:33:30 +0000 (12:33 -0500)]
storage: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoremote: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:33:20 +0000 (12:33 -0500)]
remote: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:33:04 +0000 (12:33 -0500)]
qemu: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agolxc: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:32:37 +0000 (12:32 -0500)]
lxc: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agolibxl: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:32:28 +0000 (12:32 -0500)]
libxl: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agosrc: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:32:18 +0000 (12:32 -0500)]
src: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoconf: Use consistent error preservation and restoration calls
John Ferlan [Thu, 6 Dec 2018 17:32:06 +0000 (12:32 -0500)]
conf: Use consistent error preservation and restoration calls

Provide some consistency over error message variable name and usage
when saving error messages across possible other errors or possibility
of resetting of the last error.

Instead of virSaveLastError paired up with virSetError and virFreeError,
we should use the newer virErrorPreserveLast and virRestoreError.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoconf: remove parse code for long-extinct "<state devaddr='d:b:s'/>
Laine Stump [Wed, 9 Oct 2019 13:52:25 +0000 (09:52 -0400)]
conf: remove parse code for long-extinct "<state devaddr='d:b:s'/>

Back in July 2009, in the days before libvirt supported explicitly
assigning a PCI address to every device, code was added to save the
PCI addresses of hotplugged network, disk, and hostdevs in the domain
status with this XML element:

   <state devaddr='domain:bus:slot'/>

This was added in commits 4e21a95a01654107, in v0.7.0, and 0c5b7b93
in v0.7.1.

Then just a few months later, in November 2009, The code that actually
formatted the "devaddr='blah'" into the status XML was removed by
commit 1b0cce7d3 (which "introduced a standardized data structure for
device addresses"). The code to *parse* the devaddr from the status
was left in for backward compatibility though (it just parses it into
the "standard" PCI address).

At the time the devaddr attribute was added, a few other attributes
already existed in the <state> element for network devices, and these
were removed over time (I haven't checked the exact dates of this),
but 10 years later, in libvirt v5.8.0, we *still* maintain code to
parse <state devaddr='blah'/> from the domain status.

In the meantime, even distros so old that we no longer support them in
upstream libvirt are using a libvirt new enough that it doesn't ever
write <state devaddr='blah'/> to the domain status XML.

Since the only way a current libvirt would ever encounter this element
would be if someone was upgrading directly from libvirt <= v0.7.5 with
running guests, it seems safe to finally remove the code that parses it.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 years agointernal: delete VIR_STEAL_PTR
Ján Tomko [Wed, 16 Oct 2019 11:48:56 +0000 (13:48 +0200)]
internal: delete VIR_STEAL_PTR

Delete the macro to prevent its usage in new code.

The GLib version should be used instead:
    p = g_steal_pointer(&ptr);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_steal_pointer instead of VIR_STEAL_PTR everywhere
Ján Tomko [Wed, 16 Oct 2019 11:45:15 +0000 (13:45 +0200)]
Use g_steal_pointer instead of VIR_STEAL_PTR everywhere

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: use g_steal_pointer instead of VIR_STEAL_PTR
Ján Tomko [Wed, 16 Oct 2019 11:43:52 +0000 (13:43 +0200)]
util: use g_steal_pointer instead of VIR_STEAL_PTR

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agotools: use g_steal_pointer instead of VIR_STEAL_PTR
Ján Tomko [Wed, 16 Oct 2019 11:43:36 +0000 (13:43 +0200)]
tools: use g_steal_pointer instead of VIR_STEAL_PTR

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu: use g_steal_pointer instead of VIR_STEAL_PTR
Ján Tomko [Wed, 16 Oct 2019 11:43:18 +0000 (13:43 +0200)]
qemu: use g_steal_pointer instead of VIR_STEAL_PTR

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoconf: use g_steal_pointer instead of VIR_STEAL_PTR
Ján Tomko [Wed, 16 Oct 2019 11:43:01 +0000 (13:43 +0200)]
conf: use g_steal_pointer instead of VIR_STEAL_PTR

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agointernal: delete VIR_RETURN_PTR
Ján Tomko [Wed, 16 Oct 2019 11:35:14 +0000 (13:35 +0200)]
internal: delete VIR_RETURN_PTR

Remove the macro definition to prevent its usage in new code.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoRemove all usage of VIR_RETURN_PTR
Ján Tomko [Wed, 16 Oct 2019 11:35:54 +0000 (13:35 +0200)]
Remove all usage of VIR_RETURN_PTR

Prefer:
    return g_steal_pointer(&ptr);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: delete VIR_AUTOFREE
Ján Tomko [Wed, 16 Oct 2019 11:33:16 +0000 (13:33 +0200)]
util: delete VIR_AUTOFREE

Commit 1e2ae2e311c7453e7894e93688f8785736aa0618 deleted the last use
of VIR_AUTOFREE but forgot to delete the macro definition.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoRemove virautoclean.h
Ján Tomko [Tue, 15 Oct 2019 14:04:32 +0000 (16:04 +0200)]
Remove virautoclean.h

Now that we no longer use any of the macros from this file, remove it.

This also removes a typo.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoDelete virObjectAutoUnref
Ján Tomko [Tue, 15 Oct 2019 14:03:36 +0000 (16:03 +0200)]
Delete virObjectAutoUnref

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_autoptr instead of VIR_AUTOUNREF
Ján Tomko [Tue, 15 Oct 2019 12:47:50 +0000 (14:47 +0200)]
Use g_autoptr instead of VIR_AUTOUNREF

Now that all the types using VIR_AUTOUNREF have a cleanup func defined
to virObjectUnref, use g_autoptr instead of VIR_AUTOUNREF.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoDefine G_DEFINE_AUTOPTR_CLEANUP_FUNC for virDomainCheckpointDef
Ján Tomko [Tue, 15 Oct 2019 12:47:50 +0000 (14:47 +0200)]
Define G_DEFINE_AUTOPTR_CLEANUP_FUNC for virDomainCheckpointDef

Allow g_autoptr to be used instead of VIR_AUTOUNREF.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_autoptr instead of VIR_AUTOPTR
Ján Tomko [Tue, 15 Oct 2019 12:47:50 +0000 (14:47 +0200)]
Use g_autoptr instead of VIR_AUTOPTR

Since commit 44e7f029159ed701b4a1739ac711507ee53790ed
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOPTR aliases to g_autoptr. Replace all of its use by the GLib
macro version.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse G_DEFINE_AUTOPTR_CLEANUP_FUNC instead of VIR_DEFINE_AUTOPTR_FUNC
Ján Tomko [Tue, 15 Oct 2019 12:47:50 +0000 (14:47 +0200)]
Use G_DEFINE_AUTOPTR_CLEANUP_FUNC instead of VIR_DEFINE_AUTOPTR_FUNC

Since commit 44e7f029159ed701b4a1739ac711507ee53790ed
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOPTR aliases to g_autoptr. Replace all uses of VIR_DEFINE_AUTOPTR_FUNC
with G_DEFINE_AUTOPTR_CLEANUP_FUNC in preparation for replacing the
rest.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse g_autofree instead of VIR_AUTOFREE
Ján Tomko [Tue, 15 Oct 2019 13:16:31 +0000 (15:16 +0200)]
Use g_autofree instead of VIR_AUTOFREE

Since commit 44e7f029159ed701b4a1739ac711507ee53790ed
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOFREE is just an alias for g_autofree. Use the GLib macros
directly instead of our custom aliases.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agovirbuffer: use g_auto directly for virBuffer
Ján Tomko [Tue, 15 Oct 2019 12:47:50 +0000 (14:47 +0200)]
virbuffer: use g_auto directly for virBuffer

Since commit 44e7f029159ed701b4a1739ac711507ee53790ed
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros
directly instead of our custom aliases.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: xml: use g_auto directly for VIR_XPATH_NODE_AUTORESTORE
Ján Tomko [Tue, 15 Oct 2019 12:47:50 +0000 (14:47 +0200)]
util: xml: use g_auto directly for VIR_XPATH_NODE_AUTORESTORE

Since commit 44e7f029159ed701b4a1739ac711507ee53790ed
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros
directly instead of our custom aliases.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse G_N_ELEMENTS instead of ARRAY_CARDINALITY
Ján Tomko [Tue, 15 Oct 2019 11:55:26 +0000 (13:55 +0200)]
Use G_N_ELEMENTS instead of ARRAY_CARDINALITY

Prefer the GLib version of the macro.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoexamples: Use G_N_ELEMENTS instead of ARRAY_CARDINALITY
Ján Tomko [Tue, 15 Oct 2019 11:51:20 +0000 (13:51 +0200)]
examples: Use G_N_ELEMENTS instead of ARRAY_CARDINALITY

We try to keep the example programs independent of libraries
other than libvirt.

Rename the locally defined ARRAY_CARDINALITY macro to G_N_ELEMENTS
which GLib provides, even though we don't actually include GLib.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse G_GNUC_FALLTHROUGH instead of ATTRIBUTE_FALLTHROUGH
Ján Tomko [Tue, 15 Oct 2019 11:38:21 +0000 (13:38 +0200)]
Use G_GNUC_FALLTHROUGH instead of ATTRIBUTE_FALLTHROUGH

Also define the macro for building with GLib older than 2.60

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoDocument the ATTRIBUTE_FALLTHROUGH macro
Ján Tomko [Tue, 15 Oct 2019 11:36:47 +0000 (13:36 +0200)]
Document the ATTRIBUTE_FALLTHROUGH macro

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse G_GNUC_PRINTF instead of ATTRIBUTE_FMT_PRINTF
Ján Tomko [Tue, 15 Oct 2019 11:35:07 +0000 (13:35 +0200)]
Use G_GNUC_PRINTF instead of ATTRIBUTE_FMT_PRINTF

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse G_GNUC_NO_INLINE instead of ATTRIBUTE_NOINLINE
Ján Tomko [Tue, 15 Oct 2019 11:24:34 +0000 (13:24 +0200)]
Use G_GNUC_NO_INLINE instead of ATTRIBUTE_NOINLINE

Define the macro for older GLib versions.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agosyntax-check: prohibit_attribute_macros: generalize error
Ján Tomko [Tue, 15 Oct 2019 11:13:39 +0000 (13:13 +0200)]
syntax-check: prohibit_attribute_macros: generalize error

Instead of enumerating every single macro variant, just emit
a more generic error.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agosyntax-check: mock-noinline: fix after G_GNUC attribute invocations
Ján Tomko [Tue, 15 Oct 2019 11:12:34 +0000 (13:12 +0200)]
syntax-check: mock-noinline: fix after G_GNUC attribute invocations

We started using G_GNUC macros instead of ATTRIBUTE for some attributes.
Adjust this syntax-check accordingly.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoqemu: fix EFI nvram removal on domain undefine
Pavel Mores [Tue, 15 Oct 2019 08:31:22 +0000 (10:31 +0200)]
qemu: fix EFI nvram removal on domain undefine

When undefining a UEFI domain its nvram file has to be properly handled as
well.  It's mandatory to use one of --nvram and --keep-nvram options when
'virsh undefine <domain>' is issued for a UEFI domain.  To fix the bug as
reported, virsh should return an error message if neither option is used
and the nvram file should be removed when --nvram is given.

The cause of the problem is that when qemuDomainUndefineFlags() is invoked
on an inactive domain the path to its nvram file is empty.  This commit
aims to fix this by formatting and filling in the path in time for the
nvram removal code to run properly.

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

Signed-off-by: Pavel Mores <pmores@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agosyntax-check: forbid ATTRIBUTE macros with a GLib replacement
Ján Tomko [Mon, 14 Oct 2019 15:46:42 +0000 (17:46 +0200)]
syntax-check: forbid ATTRIBUTE macros with a GLib replacement

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agointernal: remove no longer used ATTRIBUTE macros
Ján Tomko [Mon, 14 Oct 2019 12:32:36 +0000 (14:32 +0200)]
internal: remove no longer used ATTRIBUTE macros

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agogendispatch: generate G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED
Ján Tomko [Mon, 14 Oct 2019 13:03:17 +0000 (15:03 +0200)]
gendispatch: generate G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agosyntax-check: check for G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED
Ján Tomko [Mon, 14 Oct 2019 13:02:40 +0000 (15:02 +0200)]
syntax-check: check for G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoUse G_GNUC_UNUSED everywhere
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
Use G_GNUC_UNUSED everywhere

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agovz: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
vz: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agovbox: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
vbox: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agoutil: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
util: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agotools: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:44:29 +0000 (14:44 +0200)]
tools: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agotests: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:03 +0000 (14:45 +0200)]
tests: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agotest: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
test: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agostorage: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
storage: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agosecurity: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
security: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 years agorpc: use G_GNUC_UNUSED
Ján Tomko [Mon, 14 Oct 2019 12:45:33 +0000 (14:45 +0200)]
rpc: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>