[libvirt] [PATCH] docs: Add libvirt-go Go bindings to binding page
by Roman Mohr
Signed-off-by: Roman Mohr <rmohr(a)redhat.com>
---
docs/bindings.html.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/bindings.html.in b/docs/bindings.html.in
index 95cfe25..7fe26df 100644
--- a/docs/bindings.html.in
+++ b/docs/bindings.html.in
@@ -14,6 +14,10 @@
<strong>C#</strong>: Arnaud Champion develops
<a href="csharp.html">C# bindings</a>.
</li>
+ <li>
+ <strong>Go</strong>: Kyle Kelley et al. are developing
+ <a href="https://github.com/rgbkrk/libvirt-go">Go bindings</a>.
+ </li>
<li>
<strong>Java</strong>: Daniel Veillard develops
<a href="java.html">Java bindings</a>.
--
2.5.5
8 years, 3 months
[libvirt] [PATCH 0/2] Improve handling of QEMU core dumping
by Daniel P. Berrange
Daniel P. Berrange (2):
qemu: add a max_core setting to qemu.conf for core dump size
qemu: allow turning off QEMU guest RAM dump globally
src/libvirt_private.syms | 2 ++
src/qemu/libvirtd_qemu.aug | 5 +++++
src/qemu/qemu.conf | 31 +++++++++++++++++++++++++++++++
src/qemu/qemu_command.c | 18 ++++++++++++------
src/qemu/qemu_conf.c | 20 ++++++++++++++++++++
src/qemu/qemu_conf.h | 2 ++
src/qemu/qemu_process.c | 1 +
src/qemu/test_libvirtd_qemu.aug.in | 2 ++
src/util/vircommand.c | 14 ++++++++++++++
src/util/vircommand.h | 1 +
src/util/virprocess.c | 36 ++++++++++++++++++++++++++++++++++++
src/util/virprocess.h | 1 +
tests/qemuxml2argvtest.c | 4 ++++
13 files changed, 131 insertions(+), 6 deletions(-)
--
2.7.4
8 years, 3 months
[libvirt] [PATCH] Prefix major/minor with gnu_dev_
by Michal Privoznik
In the latest glibc, major() and minor() functions are marked as
deprecated (glibc commit dbab6577):
CC util/libvirt_util_la-vircgroup.lo
util/vircgroup.c: In function 'virCgroupGetBlockDevString':
util/vircgroup.c:768:5: error: '__major_from_sys_types' is deprecated:
In the GNU C Library, `major' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `major', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `major',
you should #undef it after including <sys/types.h>.
[-Werror=deprecated-declarations]
if (virAsprintf(&ret, "%d:%d ", major(sb.st_rdev), minor(sb.st_rdev)) < 0)
^~
In file included from /usr/include/features.h:397:0,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from ../gnulib/lib/stdio.h:43,
from util/vircgroup.c:26:
/usr/include/sys/sysmacros.h:87:1: note: declared here
__SYSMACROS_DEFINE_MAJOR (__SYSMACROS_FST_IMPL_TEMPL)
^
Applications are supposed to use gnu_dev_major() or
gnu_dev_minor() respectively.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_audit.c | 4 ++--
src/lxc/lxc_controller.c | 10 +++++-----
src/lxc/lxc_driver.c | 26 +++++++++++++-------------
src/util/vircgroup.c | 10 +++++-----
src/util/virutil.c | 6 +++---
tests/vircgroupmock.c | 16 ++++++++--------
6 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 53a58ac..d0bfa58 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -52,8 +52,8 @@ virDomainAuditGetRdev(const char *path)
if (stat(path, &sb) == 0 &&
(S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode))) {
- int maj = major(sb.st_rdev);
- int min = minor(sb.st_rdev);
+ int maj = gnu_dev_major(sb.st_rdev);
+ int min = gnu_dev_minor(sb.st_rdev);
ignore_value(virAsprintfQuiet(&ret, "%02X:%02X", maj, min));
}
return ret;
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 825b4d4..3bf7eb2 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -1520,7 +1520,7 @@ static int virLXCControllerPopulateDevices(virLXCControllerPtr ctrl)
LXC_STATE_DIR, ctrl->def->name, devs[i].path) < 0)
goto cleanup;
- dev_t dev = makedev(devs[i].maj, devs[i].min);
+ dev_t dev = gnu_dev_makedev(devs[i].maj, devs[i].min);
if (mknod(path, S_IFCHR, dev) < 0 ||
chmod(path, devs[i].mode)) {
virReportSystemError(errno,
@@ -1592,7 +1592,7 @@ virLXCControllerSetupHostdevSubsysUSB(virDomainDefPtr vmDef,
}
VIR_DEBUG("Creating dev %s (%d,%d)",
- dstfile, major(sb.st_rdev), minor(sb.st_rdev));
+ dstfile, gnu_dev_major(sb.st_rdev), gnu_dev_minor(sb.st_rdev));
if (mknod(dstfile, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
_("Unable to create device %s"),
@@ -1672,7 +1672,7 @@ virLXCControllerSetupHostdevCapsStorage(virDomainDefPtr vmDef,
mode = 0700 | S_IFBLK;
VIR_DEBUG("Creating dev %s (%d,%d)", dst,
- major(sb.st_rdev), minor(sb.st_rdev));
+ gnu_dev_major(sb.st_rdev), gnu_dev_minor(sb.st_rdev));
if (mknod(dst, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
_("Unable to create device %s"),
@@ -1751,7 +1751,7 @@ virLXCControllerSetupHostdevCapsMisc(virDomainDefPtr vmDef,
mode = 0700 | S_IFCHR;
VIR_DEBUG("Creating dev %s (%d,%d)", dst,
- major(sb.st_rdev), minor(sb.st_rdev));
+ gnu_dev_major(sb.st_rdev), gnu_dev_minor(sb.st_rdev));
if (mknod(dst, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
_("Unable to create device %s"),
@@ -1911,7 +1911,7 @@ static int virLXCControllerSetupDisk(virLXCControllerPtr ctrl,
* to that normally implied by the device name
*/
VIR_DEBUG("Creating dev %s (%d,%d) from %s",
- dst, major(sb.st_rdev), minor(sb.st_rdev), tmpsrc);
+ dst, gnu_dev_major(sb.st_rdev), gnu_dev_minor(sb.st_rdev), tmpsrc);
if (mknod(dst, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
_("Unable to create device %s"),
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index da98b38..3fe79fd 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3714,7 +3714,7 @@ lxcDomainAttachDeviceMknodHelper(pid_t pid ATTRIBUTE_UNUSED,
* to that normally implied by the device name
*/
VIR_DEBUG("Creating dev %s (%d,%d)",
- data->file, major(data->dev), minor(data->dev));
+ data->file, gnu_dev_major(data->dev), gnu_dev_minor(data->dev));
if (mknod(data->file, data->mode, data->dev) < 0) {
virReportSystemError(errno,
_("Unable to create device %s"),
@@ -3895,8 +3895,8 @@ lxcDomainAttachDeviceDiskLive(virLXCDriverPtr driver,
if (virCgroupAllowDevice(priv->cgroup,
'b',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
perms) < 0)
goto cleanup;
@@ -3915,8 +3915,8 @@ lxcDomainAttachDeviceDiskLive(virLXCDriverPtr driver,
file) < 0) {
if (virCgroupDenyDevice(priv->cgroup,
'b',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
perms) < 0)
VIR_WARN("cannot deny device %s for domain %s",
src, vm->def->name);
@@ -4152,8 +4152,8 @@ lxcDomainAttachDeviceHostdevStorageLive(virLXCDriverPtr driver,
if (virCgroupAllowDevice(priv->cgroup,
'b',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
VIR_CGROUP_DEVICE_RWM) < 0)
goto cleanup;
@@ -4165,8 +4165,8 @@ lxcDomainAttachDeviceHostdevStorageLive(virLXCDriverPtr driver,
def->source.caps.u.storage.block) < 0) {
if (virCgroupDenyDevice(priv->cgroup,
'b',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
VIR_CGROUP_DEVICE_RWM) < 0)
VIR_WARN("cannot deny device %s for domain %s",
def->source.caps.u.storage.block, vm->def->name);
@@ -4221,8 +4221,8 @@ lxcDomainAttachDeviceHostdevMiscLive(virLXCDriverPtr driver,
if (virCgroupAllowDevice(priv->cgroup,
'c',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
VIR_CGROUP_DEVICE_RWM) < 0)
goto cleanup;
@@ -4237,8 +4237,8 @@ lxcDomainAttachDeviceHostdevMiscLive(virLXCDriverPtr driver,
def->source.caps.u.misc.chardev) < 0) {
if (virCgroupDenyDevice(priv->cgroup,
'c',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
VIR_CGROUP_DEVICE_RWM) < 0)
VIR_WARN("cannot deny device %s for domain %s",
def->source.caps.u.storage.block, vm->def->name);
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index f2477d5..f4f6a01 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -765,7 +765,7 @@ virCgroupGetBlockDevString(const char *path)
/* Automatically append space after the string since all callers
* use it anyway */
- if (virAsprintf(&ret, "%d:%d ", major(sb.st_rdev), minor(sb.st_rdev)) < 0)
+ if (virAsprintf(&ret, "%d:%d ", gnu_dev_major(sb.st_rdev), gnu_dev_minor(sb.st_rdev)) < 0)
return NULL;
return ret;
@@ -2941,8 +2941,8 @@ virCgroupAllowDevicePath(virCgroupPtr group,
return virCgroupAllowDevice(group,
S_ISCHR(sb.st_mode) ? 'c' : 'b',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
perms);
}
@@ -3032,8 +3032,8 @@ virCgroupDenyDevicePath(virCgroupPtr group,
return virCgroupDenyDevice(group,
S_ISCHR(sb.st_mode) ? 'c' : 'b',
- major(sb.st_rdev),
- minor(sb.st_rdev),
+ gnu_dev_major(sb.st_rdev),
+ gnu_dev_minor(sb.st_rdev),
perms);
}
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 170dd59..b0770bc 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -1616,7 +1616,7 @@ virIsDevMapperDevice(const char *dev_name)
if (!stat(dev_name, &buf) &&
S_ISBLK(buf.st_mode) &&
- dm_is_dm_major(major(buf.st_rdev)))
+ dm_is_dm_major(gnu_dev_major(buf.st_rdev)))
return true;
return false;
@@ -1664,9 +1664,9 @@ virGetDeviceID(const char *path, int *maj, int *min)
return -EINVAL;
if (maj)
- *maj = major(sb.st_rdev);
+ *maj = gnu_dev_major(sb.st_rdev);
if (min)
- *min = minor(sb.st_rdev);
+ *min = gnu_dev_minor(sb.st_rdev);
return 0;
}
diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c
index ce6fd46..8f69047 100644
--- a/tests/vircgroupmock.c
+++ b/tests/vircgroupmock.c
@@ -562,11 +562,11 @@ int __lxstat(int ver, const char *path, struct stat *sb)
free(newpath);
} else if (STRPREFIX(path, fakedevicedir0)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(8, 0);
+ sb->st_rdev = gnu_dev_makedev(8, 0);
return 0;
} else if (STRPREFIX(path, fakedevicedir1)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(9, 0);
+ sb->st_rdev = gnu_dev_makedev(9, 0);
return 0;
} else {
ret = real___lxstat(ver, path, sb);
@@ -593,11 +593,11 @@ int lstat(const char *path, struct stat *sb)
free(newpath);
} else if (STRPREFIX(path, fakedevicedir0)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(8, 0);
+ sb->st_rdev = gnu_dev_makedev(8, 0);
return 0;
} else if (STRPREFIX(path, fakedevicedir1)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(9, 0);
+ sb->st_rdev = gnu_dev_makedev(9, 0);
return 0;
} else {
ret = real_lstat(path, sb);
@@ -624,11 +624,11 @@ int __xstat(int ver, const char *path, struct stat *sb)
free(newpath);
} else if (STRPREFIX(path, fakedevicedir0)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(8, 0);
+ sb->st_rdev = gnu_dev_makedev(8, 0);
return 0;
} else if (STRPREFIX(path, fakedevicedir1)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(9, 0);
+ sb->st_rdev = gnu_dev_makedev(9, 0);
return 0;
} else {
ret = real___xstat(ver, path, sb);
@@ -661,11 +661,11 @@ int stat(const char *path, struct stat *sb)
}
} else if (STRPREFIX(path, fakedevicedir0)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(8, 0);
+ sb->st_rdev = gnu_dev_makedev(8, 0);
return 0;
} else if (STRPREFIX(path, fakedevicedir1)) {
sb->st_mode = S_IFBLK;
- sb->st_rdev = makedev(9, 0);
+ sb->st_rdev = gnu_dev_makedev(9, 0);
return 0;
} else {
if (!(newpath = strdup(path)))
--
2.8.4
8 years, 3 months
[libvirt] [libvirt-glib/libvirt-gconfig 00/17] Graphics: Introduce the new Remote and Local classes (and also implement a few missing methods).
by Fabiano Fidêncio
While trying to use libvirt-gobject and libvirt-gconfig for accessing VMs
and looking at their config, instead of using libvirt and parsing XML
directly, I found out that a few methods have been missing and that
libvirt-gconfig is not exactly thought for the "reading their config" use
case (see more explanations on the 10th and 14th commits.
This series, unfortunately, introduces an ABI breakage.
Fabiano Fidêncio (17):
gconfig: Implement gvir_config_domain_graphics_vnc_get_autoport()
gconfig: Implement gvir_config_domain_graphics_spice_get_autoport()
gconfig: Implement gvir_config_domain_graphics_rdp_get_autoport()
gconfig: Implement gvir_config_domain_graphics_sdl_get_display()
gconfig: Implement gvir_config_domain_graphics_sdl_get_fullscreen()
gconfig: Implement gvir_config_domain_graphics_spice_get_tls_port()
gconfig: Implement gvir_config_domain_graphics_spice_{get,set}_host()
gconfig: Implement gvir_config_domain_graphics_vnc_{get,set}_host()
gconfig: Implement gvir_config_domain_graphics_rdp_{get,set}_host()
gconfig: Add GVirCofigDomainGraphicsRemote class
gconfig: Adapt GVirConfigDomainGraphicsSpice to
GVirConfigDomainGraphicsRemote
gconfig: Adapt GVirConfigDomainGraphicsRdp to
GVirConfigDomainGraphicsRemote
gconfig: Adapt GVirConfigDomainGraphicsVnc to
GVirConfigDomainGraphicsRemote
gconfig: Add GVirCofigDomainGraphicsLocal class
gconfig: Adapt GVirConfigDomainGraphicsSdl to
GVirConfigDomainGraphicsLocal
gconfig: Adapt GVirConfigDomainGraphicsDesktop to
GVirConfigDomainGraphicsLocal
gconfig,graphics: Avoid crash when gvir_config_object_new_from_xml()
returns NULL
libvirt-gconfig/Makefile.am | 4 +
.../libvirt-gconfig-domain-graphics-desktop.c | 14 ++-
.../libvirt-gconfig-domain-graphics-desktop.h | 4 +-
.../libvirt-gconfig-domain-graphics-local.c | 97 +++++++++++++++++++
.../libvirt-gconfig-domain-graphics-local.h | 68 ++++++++++++++
.../libvirt-gconfig-domain-graphics-rdp.c | 32 ++++++-
.../libvirt-gconfig-domain-graphics-rdp.h | 9 +-
.../libvirt-gconfig-domain-graphics-remote.c | 103 +++++++++++++++++++++
.../libvirt-gconfig-domain-graphics-remote.h | 70 ++++++++++++++
.../libvirt-gconfig-domain-graphics-sdl.c | 19 +++-
.../libvirt-gconfig-domain-graphics-sdl.h | 6 +-
.../libvirt-gconfig-domain-graphics-spice.c | 40 +++++++-
.../libvirt-gconfig-domain-graphics-spice.h | 10 +-
.../libvirt-gconfig-domain-graphics-vnc.c | 32 ++++++-
.../libvirt-gconfig-domain-graphics-vnc.h | 9 +-
libvirt-gconfig/libvirt-gconfig.h | 2 +
libvirt-gconfig/libvirt-gconfig.sym | 20 ++++
po/POTFILES.in | 2 +
18 files changed, 513 insertions(+), 28 deletions(-)
create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-local.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-local.h
create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-remote.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-remote.h
--
2.5.0
8 years, 3 months
[libvirt] virsh blockcopy or virDomainBlockCopy auto converge
by Vasiliy Tolstov
Does it possible to add something like auto converge in live migration
to blockcopy ?
In my case i'm try to do virsh blockcopy --pivot and sometime it fails
because domain write more data and it needs to be copied.
--
Vasiliy Tolstov,
e-mail: v.tolstov(a)selfip.ru
8 years, 3 months
[libvirt] [PATCH v2 0/3] virsh: Option completers and small improvements/fixes for autocomplete
by Nishith Shah
This series introduces option completers and adds some minor improvements
and fixes(not bugs per se, just better/sane behavior) in vshReadlineParse.
The first patch introduces the usage of option completers to auto-complete
arguments for a particular option.
The second and third patches provide small improvements like completing
the options of type VSH_OT_ARGV or VSH_OT_DATA, and to complete multiple
options as well, if a previous option requires an argument, and that
argument has been provided.
---
v2: Fix an infinite while loop bug
v1: https://www.redhat.com/archives/libvir-list/2016-August/msg01009.html
Nishith Shah (3):
virsh: Introduce usage of option completers to auto-complete arguments
virsh: Allow data or argument options to be completed as well
virsh: Complete multiple options when any one option requires data
tools/vsh.c | 75 ++++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 49 insertions(+), 26 deletions(-)
--
2.1.4
8 years, 3 months
[libvirt] Call for mentors: Outreachy December - March
by Stefan Hajnoczi
The Outreachy open source internship programme is running a December -
March round. Outreachy promotes participation of underrepresented
groups in open source.
If you would like to be a mentor please reply.
What is a mentor?
Mentors help interns with their project and evaluate their progress.
The mentor is the point of contact for the intern and advises them on
the development process, technical challenges, etc. Mentors propose a
list of project ideas which they are willing to mentor at the start of
the application phase.
What are the requirements for mentors?
You must be a regular contributor to QEMU, KVM, or libvirt. You must
be willing to spend ~5 hours/week between 6 Dec - 6 Mar.
Timeline:
Internship candidates apply: 12 Sep - 17 Oct
Coding period: 6 Dec - 6 Mar
Outreachy website: https://www.gnome.org/outreachy/
Overview of open source internship programmes:
http://vmsplice.net/~stefan/stefanha-kvm-forum-2016.pdf
Please let me know if you have any questions.
Stefan
8 years, 3 months
[libvirt] [libvirt-perl][PATCH 0/2] Add more PERF_PARAM_* constants
by Michal Privoznik
Now that libvirt-2.2.0 is out, we should:
a) do the libvirt-perl release too
b) adapt to new constants pushed to 2.3.0
Michal Privoznik (2):
Bump version to 2.3.0
Add more PERF_PARAM_* constants
Changes | 5 +++++
Makefile.PL | 2 +-
README | 2 +-
Virt.xs | 4 ++++
lib/Sys/Virt.pm | 2 +-
lib/Sys/Virt/Domain.pm | 27 +++++++++++++++++++++++++++
6 files changed, 39 insertions(+), 3 deletions(-)
--
2.8.4
8 years, 3 months
[libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address
by Xian Han Yu
The 'multi' element in PCI address struct used as 'virTristateSwitch',
and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI
process use 'false' to initialization 'multi', which is ambiguously
for assignment or comparison. This patch use '{0}' to initialize
the whole PCI address struct, which fix the 'multi' initialization
and makes code more simplify and explicitly.
Signed-off-by: Xian Han Yu <xhyubj(a)linux.vnet.ibm.com>
---
src/conf/domain_addr.c | 2 +-
src/conf/node_device_conf.c | 2 +-
src/qemu/qemu_domain_address.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index a0c2f88..cf6b73d 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -569,7 +569,7 @@ virDomainPCIAddressGetNextSlot(virDomainPCIAddressSetPtr addrs,
/* default to starting the search for a free slot from
* the first slot of domain 0 bus 0...
*/
- virPCIDeviceAddress a = { 0, 0, 0, 0, false };
+ virPCIDeviceAddress a = {0};
char *addrStr = NULL;
if (addrs->nbuses == 0) {
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index a23d8ef..c8e30d9 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1163,7 +1163,7 @@ virNodeDevCapPCIDevIommuGroupParseXML(xmlXPathContextPtr ctxt,
goto cleanup;
for (i = 0; i < nAddrNodes; i++) {
- virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 };
+ virPCIDeviceAddress addr = {0};
if (virPCIDeviceAddressParseXML(addrNodes[i], &addr) < 0)
goto cleanup;
if (VIR_ALLOC(pciAddr) < 0)
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 3d52d72..bb16738 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1096,7 +1096,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
/* USB2 needs special handling to put all companions in the same slot */
if (IS_USB2_CONTROLLER(def->controllers[i])) {
- virPCIDeviceAddress addr = { 0, 0, 0, 0, false };
+ virPCIDeviceAddress addr = {0};
bool foundAddr = false;
memset(&tmp_addr, 0, sizeof(tmp_addr));
--
2.5.5
8 years, 3 months