]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vz: pass virDomainXMLOptionPtr to virDomainVideoDefNew
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 9 Dec 2019 14:39:20 +0000 (14:39 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 9 Dec 2019 14:46:13 +0000 (14:46 +0000)
The virDomainVideoDefNew requires the xml options to be
provided since

  commit 3dbf3941ad7202ec4426cfe965d8ba97ee8d49df
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   Mon Sep 23 14:44:35 2019 +0400

    conf: add privateData to virDomainVideoDef

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/vz/vz_sdk.c

index 0daffb6844d8713ad42b0c97edf55eacfa22bb16..59d7d3141956abc020e3f785db698d09c9cc7067 100644 (file)
@@ -544,7 +544,8 @@ prlsdkGetDomainState(virDomainObjPtr dom, PRL_HANDLE sdkdom, VIRTUAL_MACHINE_STA
 }
 
 static int
-prlsdkAddDomainVideoInfoCt(virDomainDefPtr def)
+prlsdkAddDomainVideoInfoCt(virDomainDefPtr def,
+                           virDomainXMLOptionPtr xmlopt)
 {
     virDomainVideoDefPtr video = NULL;
     int ret = -1;
@@ -552,7 +553,7 @@ prlsdkAddDomainVideoInfoCt(virDomainDefPtr def)
     if (def->ngraphics == 0)
         return 0;
 
-    if (!(video = virDomainVideoDefNew()))
+    if (!(video = virDomainVideoDefNew(xmlopt)))
         goto cleanup;
 
     video->type = VIR_DOMAIN_VIDEO_TYPE_PARALLELS;
@@ -1288,10 +1289,13 @@ prlsdkAddSerialInfo(PRL_HANDLE sdkdom,
 
 
 static int
-prlsdkAddDomainHardware(vzDriverPtr driver, PRL_HANDLE sdkdom, virDomainDefPtr def)
+prlsdkAddDomainHardware(vzDriverPtr driver,
+                        PRL_HANDLE sdkdom,
+                        virDomainDefPtr def,
+                        virDomainXMLOptionPtr xmlopt)
 {
     if (IS_CT(def)) {
-        if (prlsdkAddDomainVideoInfoCt(def) < 0)
+        if (prlsdkAddDomainVideoInfoCt(def, xmlopt) < 0)
             goto error;
     } else {
         if (prlsdkAddDomainVideoInfoVm(sdkdom, def) < 0)
@@ -1890,7 +1894,7 @@ prlsdkLoadDomain(vzDriverPtr driver,
         goto error;
 
     /* depends on prlsdkAddVNCInfo */
-    if (prlsdkAddDomainHardware(driver, sdkdom, def) < 0)
+    if (prlsdkAddDomainHardware(driver, sdkdom, def, driver->xmlopt) < 0)
         goto error;
 
     /* depends on prlsdkAddDomainHardware */