[PATCH 2/3] qemu: Copy missing QEMU caps elements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 3361a40..6c80d59 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -354,6 +354,8 @@ struct virQEMUCapsMachineType {
  * correctly. It does not have to be ABI-stable, as
  * the cache will be discarded & repopulated if the
  * timestamp on the libvirtd binary changes.
+ *
+ * And don't forget to update virQEMUCapsNewCopy.
  */
 struct _virQEMUCaps {
     virObject object;
@@ -2016,6 +2018,11 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
 
     ret->usedQMP = qemuCaps->usedQMP;
 
+    if (VIR_STRDUP(ret->binary, qemuCaps->binary) < 0)
+        goto error;
+
+    ret->ctime = qemuCaps->ctime;
+
     virBitmapCopy(ret->flags, qemuCaps->flags);
 
     ret->version = qemuCaps->version;
@@ -2044,6 +2051,12 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
         ret->machineTypes[i].maxCpus = qemuCaps->machineTypes[i].maxCpus;
     }
 
+    if (VIR_ALLOC_N(ret->gicCapabilities, qemuCaps->ngicCapabilities) < 0)
+        goto error;
+    ret->ngicCapabilities = qemuCaps->ngicCapabilities;
+    for (i = 0; i < qemuCaps->ngicCapabilities; i++)
+        ret->gicCapabilities[i] = qemuCaps->gicCapabilities[i];
+
     return ret;
 
  error:
-- 
2.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]