[libvirt] [PATCH] Drop needless ret variable

2019-10-23 Thread Michal Privoznik
@ret declaration with a few spaces instead of removing the line. But nothing terribly wrong. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_driver.c| 38 +--- src/conf/checkpoint_conf.c | 5 +--- src/conf/domain_conf.c | 12

[libvirt] [PATCH] .gitignore: Ignore src/admin/libvirt_admin.{def, syms}

2019-10-23 Thread Michal Privoznik
In v5.8.0-332-g3097282d86 the libvirt-admin.so was moved into src/admin/ directory. However, corresponding .gitignore change was left out. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore

Re: [libvirt] [PATCH 00/75] Drop virAsprintf() in favor of g_strdup_printf()

2019-10-23 Thread Michal Privoznik
On 10/22/19 3:57 PM, Michal Privoznik wrote: > For future reference and anybody interested, I've made these changes using coccinelle http://coccinelle.lip6.fr/ I've used three semantic patches (aka spatch). The first one was to rename virAsprintfQueit() to virAsprintf(). It is trivial: $

Re: [libvirt] [PATCH 03/75] access: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
On 10/22/19 4:09 PM, Daniel P. Berrangé wrote: On Tue, Oct 22, 2019 at 03:57:07PM +0200, Michal Privoznik wrote: These functions can't fail really. Drop checking of their retval then. These are declared G_GNUC_WARN_UNUSED_RESULT so this will surely result in a broken build when bisecting

[libvirt] [PATCH 16/75] nwfilter: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/nwfilter/nwfilter_dhcpsnoop.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c

[libvirt] [PATCH 22/75] security: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/security/security_apparmor.c | 38 +--- src/security/security_dac.c | 30 + src/security/security_selinux.c | 55 +--- src/security

[libvirt] [PATCH 31/75] tests: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- tests/commandtest.c | 27 +++ tests/cputest.c | 95 +--- tests/domaincapstest.c | 26 +++ tests

[libvirt] [PATCH 54/75] remote: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/remote/remote_daemon.c | 28 ++-- src/remote/remote_daemon_config.c | 2 +- src/remote/remote_daemon_dispatch.c | 14 +++--- src/remote/remote_driver.c | 12 ++-- 4 files changed, 28 insertions

[libvirt] [PATCH 29/75] vmx: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/vmx/vmx.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 0d1d87bac6..6f47546edf 100644 --- a/src/vmx/vmx.c +++ b

[libvirt] [PATCH 66/75] tools: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tools/virsh-completer-domain.c | 6 +++--- tools/virsh-completer-host.c | 10 +- tools/virsh-completer.c| 2 +- tools/virsh-domain-monitor.c | 18 +- tools/virsh-domain.c | 22 +++--- tools/virsh

[libvirt] [PATCH 60/75] util: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/util/viraudit.c | 2 +- src/util/virauth.c | 10 ++--- src/util/virauthconfig.c| 6 +-- src/util/vircgroup.c| 22 +-- src/util/vircgroupv1.c | 64 src/util

[libvirt] [PATCH 53/75] qemu: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_agent.c| 6 +-- src/qemu/qemu_alias.c| 88 +++ src/qemu/qemu_block.c| 30 +-- src/qemu/qemu_blockjob.c | 8 +-- src/qemu/qemu_capabilities.c | 8 +-- src/qemu

[libvirt] [PATCH 57/75] security: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/security/security_apparmor.c | 22 +- src/security/security_dac.c | 20 src/security/security_selinux.c | 40 src/security/security_util.c | 12 +- src/security/virt-aa

[libvirt] [PATCH 63/75] vmx: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/vmx/vmx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 6f47546edf..8aaefba1c1 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2081,7 +2081,7 @@ virVMXParseDisk(virVMXContext *ctx

[libvirt] [PATCH 64/75] vz: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/vz/vz_driver.c | 2 +- src/vz/vz_sdk.c| 32 +++- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index adde179951..54413fdc67 100644 --- a/src/vz/vz_driver.c +++ b

[libvirt] [PATCH 43/75] interface: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/interface/interface_backend_netcf.c | 4 ++-- src/interface/interface_backend_udev.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c index

[libvirt] [PATCH 55/75] rpc: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/rpc/virnetclient.c| 12 ++-- src/rpc/virnetlibsshsession.c | 8 src/rpc/virnetsocket.c| 2 +- src/rpc/virnetsshsession.c| 11 ++- src/rpc/virnettlscontext.c| 26 +- 5 files changed

[libvirt] [PATCH 09/75] interface: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/interface/interface_backend_netcf.c | 7 ++- src/interface/interface_backend_udev.c | 14 -- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src

[libvirt] [PATCH 65/75] tests: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/bhyveargv2xmltest.c | 10 ++-- tests/bhyvexml2argvtest.c | 18 +++ tests/bhyvexml2xmltest.c| 10 ++-- tests/commandtest.c | 18 +++ tests/cputest.c | 60

[libvirt] [PATCH 56/75] secret: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/secret/secret_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 064a02dfdd..5a5c84412a 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c

[libvirt] [PATCH 75/75] Drop virVasprintf()

2019-10-22 Thread Michal Privoznik
Now that function is no longer used, it can be dropped. Signed-off-by: Michal Privoznik --- docs/hacking.html.in | 5 - src/libvirt_private.syms | 1 - src/util/virstring.c | 21 - src/util/virstring.h | 11 --- 4 files changed, 38 deletions

[libvirt] [PATCH 24/75] test: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/test/test_driver.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 74/75] Use g_strdup_vprintf() instead of virVasprintf() everywhere

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/libxl/libxl_logger.c | 2 +- src/qemu/qemu_domain.c| 4 ++-- src/util/viraudit.c | 2 +- src/util/vircommand.c | 4 ++-- src/util/virerror.c | 4 ++-- src/util/virfile.c| 18

[libvirt] [PATCH 62/75] vmware: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/vmware/vmware_conf.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 1e836ec7ed..ef7696a496 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c

[libvirt] [PATCH 72/75] Drop virVasprintf() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/libxl/libxl_logger.c | 3 +-- src/qemu/qemu_domain.c| 6 ++ src/util/viraudit.c | 3 +-- src/util/vircommand.c | 12

[libvirt] [PATCH 13/75] lxc: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/lxc/lxc_container.c | 69 ++- src/lxc/lxc_controller.c | 79 +--- src/lxc/lxc_driver.c | 15 ++-- src/lxc

[libvirt] [PATCH 67/75] Use g_strdup_printf instead of virAsprintf everywhere

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/driver.c| 4 ++-- src/libvirt-admin.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/driver.c b/src/driver.c index 89851cb629..2392fd7d5f 100644 --- a/src/driver.c +++ b/src/driver.c @@ -90,7 +90,7

[libvirt] [PATCH 52/75] phyp: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/phyp/phyp_driver.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 6aa47ac511..bc4e08d198 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -504,8

[libvirt] [PATCH 70/75] Rename virVasprintfQuiet() to virVasprintf()

2019-10-22 Thread Michal Privoznik
There's no difference between virVasprintf() and virVasprintfQuiet(). Fix places where the latter is used to use the former. Signed-off-by: Michal Privoznik --- src/util/virerror.c | 4 ++-- src/util/virlog.c | 2 +- tests/eventtest.c | 2 +- tools/vsh.c | 4 ++-- 4 files changed, 6

[libvirt] [PATCH 69/75] Drop virAsprintf()

2019-10-22 Thread Michal Privoznik
Now that function is no longer used, it can be dropped. Signed-off-by: Michal Privoznik --- build-aux/syntax-check.mk | 10 +- docs/hacking.html.in| 8 m4/virt-compile-warnings.m4 | 2 -- src/libvirt_private.syms| 1 - src/util/virstring.c| 14

[libvirt] [PATCH 71/75] virstring: Drop virVasprintfQuiet()

2019-10-22 Thread Michal Privoznik
This macro is no longer used and therefore can be dropped. Signed-off-by: Michal Privoznik --- src/util/virstring.h | 9 - 1 file changed, 9 deletions(-) diff --git a/src/util/virstring.h b/src/util/virstring.h index 5de6dd3252..6072af8f59 100644 --- a/src/util/virstring.h +++ b/src

[libvirt] [PATCH 48/75] network: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 58 ++--- src/network/leaseshelper.c | 4 +-- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index b82a371fe4

[libvirt] [PATCH 44/75] libxl: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/libxl/libxl_conf.c | 22 +++--- src/libxl/libxl_domain.c| 15 +++ src/libxl/libxl_driver.c| 12 ++-- src/libxl/libxl_logger.c| 8 src/libxl/libxl_migration.c | 6 +++--- src/libxl/xen_common.c

[libvirt] [PATCH 68/75] virpcimock: Make @fakerootdir static

2019-10-22 Thread Michal Privoznik
Since we are not passing the @fakerootdir variable to any inline function anymore, we can make the variable static. Signed-off-by: Michal Privoznik --- tests/virpcimock.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index

[libvirt] [PATCH 51/75] openvz: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/openvz/openvz_conf.c | 12 ++-- src/openvz/openvz_driver.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index cb64ed57f0..7676656af1 100644 --- a/src/openvz

[libvirt] [PATCH 73/75] virstring: Make virVasprintf() return no value

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/util/virstring.c | 7 ++- src/util/virstring.h | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/virstring.c b/src/util/virstring.c index f6495fdb72..c704ce38f0 100644 --- a/src/util/virstring.c +++ b/src/util

[libvirt] [PATCH 50/75] nwfilter: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/nwfilter/nwfilter_dhcpsnoop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index b4ce8a0613..4e77ca0d2d 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b

[libvirt] [PATCH 61/75] vbox: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/vbox/vbox_MSCOMGlue.c | 4 ++-- src/vbox/vbox_XPCOMCGlue.c| 2 +- src/vbox/vbox_common.c| 30 +++--- src/vbox/vbox_network.c | 10 +- src/vbox/vbox_snapshot_conf.c | 12 ++-- src/vbox

[libvirt] [PATCH 58/75] storage: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/storage/storage_backend_disk.c | 4 +- src/storage/storage_backend_gluster.c | 8 ++-- src/storage/storage_backend_iscsi.c| 16 +++ src/storage/storage_backend_iscsi_direct.c | 28 ++-- src/storage

[libvirt] [PATCH 45/75] locking: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/locking/lock_daemon.c | 8 src/locking/lock_daemon_config.c | 2 +- src/locking/lock_driver_lockd.c | 4 ++-- src/locking/lock_driver_sanlock.c | 8 src/locking/lock_manager.c| 2 +- 5 files changed, 12 insertions

[libvirt] [PATCH 49/75] node_device: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/node_device/node_device_driver.c | 2 +- src/node_device/node_device_hal.c| 4 ++-- src/node_device/node_device_udev.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device

[libvirt] [PATCH 59/75] test: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/test/test_driver.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 96607c04eb..b9ed76c26c 100644 --- a/src/test/test_driver.c +++ b/src/test

[libvirt] [PATCH 47/75] lxc: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/lxc/lxc_container.c | 41 +-- src/lxc/lxc_controller.c | 46 src/lxc/lxc_driver.c | 8 +++ src/lxc/lxc_fuse.c | 6 +++--- src/lxc/lxc_monitor.c| 2 +- src/lxc

[libvirt] [PATCH 46/75] logging: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/logging/log_daemon.c| 8 src/logging/log_daemon_config.c | 2 +- src/logging/log_manager.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index 2304c310d1

[libvirt] [PATCH 40/75] cpu: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/cpu/cpu_ppc64.c | 19 --- src/cpu/cpu_x86.c | 14 ++ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 990bbbd45f..3236a9616e 100644 --- a/src/cpu/cpu_ppc64.c

[libvirt] [PATCH 41/75] esx: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/esx/esx_driver.c | 40 +- src/esx/esx_storage_backend_vmfs.c | 46 +++--- src/esx/esx_stream.c | 8 +++--- src/esx/esx_vi.c | 23 +++ 4 files changed

[libvirt] [PATCH 39/75] conf: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/conf/capabilities.c | 2 +- src/conf/domain_addr.c | 8 +++ src/conf/domain_audit.c | 38 src/conf/domain_conf.c | 30 - src/conf/moment_conf.c

[libvirt] [PATCH 42/75] hyperv: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/hyperv/hyperv_driver.c | 8 src/hyperv/hyperv_wmi.c| 18 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index eb35cf6115..b1dafe7c80 100644 --- a/src

[libvirt] [PATCH 37/75] access: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/access/viraccessdriverpolkit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdriverpolkit.c index 5d6c4204ff..1d6ff81391 100644 --- a/src/access/viraccessdriverpolkit.c

[libvirt] [PATCH 38/75] bhyve: Use g_strdup_printf() instead of virAsprintf()

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_capabilities.c | 4 ++-- src/bhyve/bhyve_process.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 2f03bd6131..a533692517 100644 --- a/src

[libvirt] [PATCH 36/75] virstring: Drop virAsprintfQuiet()

2019-10-22 Thread Michal Privoznik
This macro is no longer used, Signed-off-by: Michal Privoznik --- src/util/virstring.h | 12 1 file changed, 12 deletions(-) diff --git a/src/util/virstring.h b/src/util/virstring.h index f595d0ad4c..318b64a136 100644 --- a/src/util/virstring.h +++ b/src/util/virstring.h

[libvirt] [PATCH 11/75] locking: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/locking/lock_daemon.c | 17 + src/locking/lock_daemon_config.c | 5 + src/locking/lock_driver_lockd.c | 9 ++--- src/locking/lock_driver_sanlock.c

[libvirt] [PATCH 25/75] util: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/util/viraudit.c | 3 +- src/util/virauth.c | 17 ++--- src/util/virauthconfig.c| 9 +-- src/util/vircgroup.c| 39 --- src

[libvirt] [PATCH 34/75] virstring: Make virAsprintf() return no value

2019-10-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/util/virstring.c | 11 +++ src/util/virstring.h | 5 ++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/util/virstring.c b/src/util/virstring.c index 24a9e41493..91b237f358 100644 --- a/src/util/virstring.c +++ b/src/util

[libvirt] [PATCH 35/75] Rename virAsprintfQuiet() to virAsprintf()

2019-10-22 Thread Michal Privoznik
There's no difference between virAsprintf() and virAsprintfQuiet(). Fix places where the latter is used to use the former. Signed-off-by: Michal Privoznik --- src/conf/domain_audit.c | 38 - src/locking/lock_driver_sanlock.c | 2 +- src/security/virt-aa-helper.c

[libvirt] [PATCH 18/75] phyp: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/phyp/phyp_driver.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 8b1d804233..6aa47ac511

[libvirt] [PATCH 33/75] Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/driver.c| 6 ++ src/libvirt-admin.c | 12 +--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/driver.c b/src/driver.c index 125cf02890

[libvirt] [PATCH 32/75] tools: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- tools/virsh-completer-domain.c | 7 +++ tools/virsh-completer-host.c | 13 +--- tools/virsh-completer.c| 6 +++--- tools/virsh-domain-monitor.c | 21

[libvirt] [PATCH 30/75] vz: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/vz/vz_driver.c | 3 +-- src/vz/vz_sdk.c| 40 +--- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz

[libvirt] [PATCH 28/75] vmware: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/vmware/vmware_conf.c | 31 +-- src/vmware/vmware_conf.h | 4 ++-- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/vmware/vmware_conf.c

[libvirt] [PATCH 27/75] vbox: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/vbox/vbox_XPCOMCGlue.c| 3 +- src/vbox/vbox_common.c| 62 +++ src/vbox/vbox_network.c | 13 +++- src/vbox/vbox_snapshot_conf.c

[libvirt] [PATCH 26/75] secret: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/secret/secret_driver.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 6d2844f3b7

[libvirt] [PATCH 20/75] remote: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/remote/remote_daemon.c | 37 - src/remote/remote_daemon_config.c | 5 +--- src/remote/remote_daemon_dispatch.c | 20 ++-- src/remote

[libvirt] [PATCH 10/75] libxl: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/libxl/libxl_conf.c | 34 +++--- src/libxl/libxl_domain.c| 35 +-- src/libxl/libxl_domain.h| 2 +- src/libxl

[libvirt] [PATCH 19/75] qemu: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_agent.c| 9 +- src/qemu/qemu_alias.c| 114 +++--- src/qemu/qemu_block.c| 41 +++- src/qemu/qemu_blockjob.c

[libvirt] [PATCH 21/75] rpc: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/rpc/virnetclient.c| 23 +++-- src/rpc/virnetlibsshsession.c | 17 --- src/rpc/virnetsocket.c| 3 +-- src/rpc/virnetsshsession.c| 18

[libvirt] [PATCH 15/75] node_device: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/node_device/node_device_driver.c | 3 +-- src/node_device/node_device_hal.c| 7 ++- src/node_device/node_device_udev.c | 11 +++ 3 files changed, 6 insertions

[libvirt] [PATCH 23/75] storage: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/storage/storage_backend_disk.c | 7 +- src/storage/storage_backend_gluster.c | 16 +--- src/storage/storage_backend_iscsi.c| 17 ++--- src/storage

[libvirt] [PATCH 14/75] network: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 69 - src/network/leaseshelper.c | 6 ++-- 2 files changed, 31 insertions(+), 44 deletions(-) diff --git a/src/network

[libvirt] [PATCH 07/75] esx: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/esx/esx_driver.c | 54 +--- src/esx/esx_storage_backend_vmfs.c | 67 +++--- src/esx/esx_stream.c | 11 ++--- src

[libvirt] [PATCH 08/75] hyperv: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/hyperv/hyperv_driver.c | 9 +++-- src/hyperv/hyperv_wmi.c| 21 - 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/hyperv

[libvirt] [PATCH 12/75] logging: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/logging/log_daemon.c| 26 +++--- src/logging/log_daemon_config.c | 5 + src/logging/log_manager.c | 5 + 3 files changed, 9 insertions

[libvirt] [PATCH 17/75] openvz: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/openvz/openvz_conf.c | 18 ++ src/openvz/openvz_driver.c | 7 +++ 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src

[libvirt] [PATCH 02/75] qemu_command: Change logic in qemuVirCommandGet{FDSet, GetDevSet}

2019-10-22 Thread Michal Privoznik
These two functions have pattern that's preventing us from simpler virAsprintf() -> g_strdup_printf() transition. Modify their logic a bit. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/q

[libvirt] [PATCH 05/75] conf: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/conf/capabilities.c | 3 +- src/conf/domain_addr.c | 8 ++--- src/conf/domain_audit.c | 60 src/conf/domain_conf.c

[libvirt] [PATCH 04/75] bhyve: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_capabilities.c | 6 ++ src/bhyve/bhyve_process.c | 16 +--- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/bhyve

[libvirt] [PATCH 00/75] Drop virAsprintf() in favor of g_strdup_printf()

2019-10-22 Thread Michal Privoznik
You can find these also on my github: https://github.com/zippy2/libvirt/tree/virasprintf_void Good luck. Michal Prívozník (75): src: Don't rely on virAsprintf() returning string length qemu_command: Change logic in qemuVirCommandGet{FDSet,GetDevSet} access: Drop virAsprintf() and

[libvirt] [PATCH 06/75] cpu: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/cpu/cpu_ppc64.c | 21 ++--- src/cpu/cpu_x86.c | 19 --- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu

[libvirt] [PATCH 03/75] access: Drop virAsprintf() and virAsprintfQuiet() retval checking

2019-10-22 Thread Michal Privoznik
These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/access/viraccessdriverpolkit.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdriverpolkit.c index

[libvirt] [PATCH 01/75] src: Don't rely on virAsprintf() returning string length

2019-10-22 Thread Michal Privoznik
of virNWFilterSnoopLeaseFileWrite() and virFilePrintf() we can use strlen() right after virAsprintf() to calculate the length. In case of virDoubleToStr() it's only caller checks for error case only, so we can limit the set of returned values to just [-1, 0]. Signed-off-by: Michal Privoznik --- src/nwfilter

[libvirt] [PATCH] libxl_domain: Use g_autoptr for libxlDriverConfig

2019-10-22 Thread Michal Privoznik
This simplifies some functions, but mostly libxlDomainManagedSavePath() which is going to be modified in future commits. Signed-off-by: Michal Privoznik --- src/libxl/libxl_domain.c | 34 ++ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src

Re: [libvirt] [PATCH 03/34] conf: use g_strdup in virDomainDiskSet

2019-10-22 Thread Michal Privoznik
On 10/20/19 2:55 PM, Ján Tomko wrote: 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 --- src/conf/domain_conf.c | 26

[libvirt] [PATCH] bhyve: Ignore test_libvirtd_bhyve.aug

2019-10-22 Thread Michal Privoznik
The file is generated during build, but not ignored. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 85ead5c907..acd88b0340 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,7

[libvirt] [PATCH] bhyve_conf: Drop unused 'error' label in virBhyveDriverConfigNew()

2019-10-22 Thread Michal Privoznik
There's unused 'error' label left after transition from VIR_STRDUP() to g_strdup (v5.8.0-255-g652cdbe364). Signed-off-by: Michal Privoznik --- Pushed under trivial & build breaker rules. src/bhyve/bhyve_conf.c | 4 1 file changed, 4 deletions(-) diff --git a/src/bhyve/bhyve_conf.c b

Re: [libvirt] [PATCH 00/34] Use g_strdup instead of VIR_STRDUP (glib chronicles)

2019-10-22 Thread Michal Privoznik
of VIR_STRDUP tools: use g_strdup instead of VIR_STRDUP Use g_strdup instead of VIR_STRDUP everywhere Should we have 35/34 which drops VIR_STRDUP.* macros and extend hacking.html? If so, you can count with my ACK on it too. Reviewed-by: Michal Privoznik Michal -- libvir-list mailing

Re: [libvirt] [PATCH 32/34] tests: use g_strdup instead of VIR_STRDUP

2019-10-22 Thread Michal Privoznik
On 10/20/19 2:55 PM, Ján Tomko wrote: Replace all occurrences of if (VIR_STRDUP(a, b) < 0) /* effectively dead code */ with: a = g_strdup(b); Signed-off-by: Ján Tomko --- tests/bhyvexml2argvmock.c | 6 +-- tests/commandtest.c | 5 +--

Re: [libvirt] [PATCH 00/10] tools: remove vshStrdup (glib chronicles)

2019-10-22 Thread Michal Privoznik
On 10/19/19 5:55 PM, Ján Tomko wrote: On Sat, Oct 19, 2019 at 07:21:15AM -0300, Daniel Henrique Barboza wrote: On 10/18/19 7:37 PM, Ján Tomko wrote: Ján Tomko (10):   tools: cmdDomblkinfoGet: reindent parameters   virsh: use g_strdup in cmdDomblkinfoGet   virsh: use g_strdup in

[libvirt] [PATCH v3] glibcompat: Reimplement g_strdup_printf() and g_strdup_vprintf()

2019-10-18 Thread Michal Privoznik
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 --- Diff to v3: - fixed infinite recursion src/internal.h

[libvirt] [PATCH v2] glibcompat: Reimplement g_strdup_printf() and g_strdup_vprintf()

2019-10-18 Thread Michal Privoznik
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 --- v2 of: https://www.redhat.com/archives/libvir-list/2019

[libvirt] [PATCH 2/2] m4: Don't suggest attribute malloc

2019-10-18 Thread Michal Privoznik
. 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 --- m4/virt-compile-warnings.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index

[libvirt] [PATCH 0/2] Couple of g_strdup_printf() fixes

2019-10-18 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virstring: Reimplement g_strdup_printf() and g_strdup_vprintf() m4: Don't suggest attribute malloc m4/virt-compile-warnings.m4 | 1 + src/libvirt_private.syms| 2 ++ src/util/virstring.c| 29 +

[libvirt] [PATCH 1/2] virstring: Reimplement g_strdup_printf() and g_strdup_vprintf()

2019-10-18 Thread Michal Privoznik
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 --- Dan claims this is fixed upstream, but I'm failing

Re: [libvirt] [PATCH v4 3/5] qemu_driver: use g_autofree when possible

2019-10-17 Thread Michal Privoznik
On 10/16/19 10:54 PM, Daniel Henrique Barboza wrote: 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 Signed-off-by: Daniel Henrique Barboza

Re: [libvirt] [PATCH v4 0/5] qemu_driver: GLib powered cleanup

2019-10-17 Thread Michal Privoznik
deletions(-) I'll replace qemu_driver with qemu_driver.c in subjects because you're touching qemu_driver.c only. Reviewed-by: Michal Privoznik And pushed. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/3] docs: hacking: document removed macro replacements (glib chronicles)

2019-10-17 Thread Michal Privoznik
+--- 1 file changed, 47 insertions(+), 24 deletions(-) Nice. Reviewed-by: Michal Privoznik Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/2] qemu: fix build with musl libc

2019-10-17 Thread Michal Privoznik
On 10/16/19 1:22 PM, casan...@redhat.com wrote: From: Carlos Santos On musl libc "stderr" is a preprocessor macro whose expansion leads to compilation errors: Indeed, from their stdio.h: #define stdin (stdin) #define stdout (stdout) #define stderr (stderr)

Re: [libvirt] [PATCH 2/2] storage: fix build with musl libc

2019-10-17 Thread Michal Privoznik
On 10/16/19 1:22 PM, casan...@redhat.com wrote: From: Carlos Santos 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:

Re: [libvirt] [PATCH 0/2] Fix build with musl libc

2019-10-17 Thread Michal Privoznik
changed, 11 insertions(+), 5 deletions(-) I've fixed 2/2 as suggested, and pushed. Reviewed-by: Michal Privoznik Congratulations on your first libvirt contribution! Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] Drop needless @ret variable

2019-10-17 Thread Michal Privoznik
@ret declaration with a few spaces instead of removing the line. But nothing terribly wrong. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_driver.c| 38 +--- src/conf/checkpoint_conf.c | 5 +--- src/conf/domain_conf.c | 4 +-- src

Re: [libvirt] [PATCH 0/9] GLib macros and where to find them (glib chronicles)

2019-10-16 Thread Michal Privoznik
instead of VIR_STEAL_PTR util: use g_steal_pointer instead of VIR_STEAL_PTR Use g_steal_pointer instead of VIR_STEAL_PTR everywhere internal: delete VIR_STEAL_PTR Reviewed-by: Michal Privoznik Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

  1   2   3   4   5   6   7   8   9   10   >