]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: Move virDomainXMLOptionNew into libxlCreateXMLConf
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 30 May 2014 14:53:12 +0000 (15:53 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 3 Jun 2014 10:45:59 +0000 (11:45 +0100)
To allow the test suite to creat the XML option object,
move the virDomainXMLOptionNew call into a libxlCreateXMLConf
method.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/libxl/libxl_conf.c
src/libxl/libxl_conf.h
src/libxl/libxl_driver.c

index f9e3a1b8b69da17871ae6fd2ad26ed140b9fd4d0..14742decde2f3b376cd4b2ec662efbe9c6b1d853 100644 (file)
@@ -1336,3 +1336,11 @@ libxlBuildDomainConfig(virPortAllocatorPtr graphicsports,
 
     return 0;
 }
+
+virDomainXMLOptionPtr
+libxlCreateXMLConf(void)
+{
+    return virDomainXMLOptionNew(&libxlDomainDefParserConfig,
+                                 &libxlDomainXMLPrivateDataCallbacks,
+                                 NULL);
+}
index 2dcd0b800420a42b5b8ebde4eaf7b299216d2dec..433d6daf155cda813922a44055692fb20486e02c 100644 (file)
@@ -158,6 +158,9 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports,
 int
 libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev);
 
+virDomainXMLOptionPtr
+libxlCreateXMLConf(void);
+
 int
 libxlBuildDomainConfig(virPortAllocatorPtr graphicsports,
                        virDomainDefPtr def,
index df7d51066d484d8d1ab6485f8fb9f1c6ced69ead..515d5c9a6f310323adf09dcb2f70cde430841029 100644 (file)
@@ -353,9 +353,7 @@ libxlStateInitialize(bool privileged,
         goto error;
     }
 
-    if (!(libxl_driver->xmlopt = virDomainXMLOptionNew(&libxlDomainDefParserConfig,
-                                                       &libxlDomainXMLPrivateDataCallbacks,
-                                                       NULL)))
+    if (!(libxl_driver->xmlopt = libxlCreateXMLConf()))
         goto error;
 
     /* Load running domains first. */