forked from pool/libvirt
24511ba7f9
e4d131b8-mv-virDomainDefPostParseInternal.patch, 3e428670-post-parse-implicit-video.patch, 538012c8-default-vram.patch, 96b21fb0-vram-tests.patch, 400e716d-libxl-noprope-emulator.patch, b90c4b5f-tests-use-qemu-xen.patch bsc#979397 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=528
106 lines
3.1 KiB
Diff
106 lines
3.1 KiB
Diff
commit e4d131b8cb12679814b6fda159281f472b615524
|
|
Author: Ján Tomko <jtomko@redhat.com>
|
|
Date: Wed May 11 11:57:33 2016 +0200
|
|
|
|
Move virDomainDefPostParseInternal after virDomainDeviceDefPostParse
|
|
|
|
Future commit will call DeviceDefPostParse on a device auto-added
|
|
in DomainDefPostParse.
|
|
|
|
Index: libvirt-1.3.4/src/conf/domain_conf.c
|
|
===================================================================
|
|
--- libvirt-1.3.4.orig/src/conf/domain_conf.c
|
|
+++ libvirt-1.3.4/src/conf/domain_conf.c
|
|
@@ -3905,45 +3905,6 @@ virDomainDefPostParseTimer(virDomainDefP
|
|
}
|
|
|
|
|
|
-static int
|
|
-virDomainDefPostParseInternal(virDomainDefPtr def,
|
|
- virCapsPtr caps ATTRIBUTE_UNUSED,
|
|
- unsigned int parseFlags)
|
|
-{
|
|
- /* verify init path for container based domains */
|
|
- if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) {
|
|
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
|
- _("init binary must be specified"));
|
|
- return -1;
|
|
- }
|
|
-
|
|
- if (virDomainDefPostParseMemory(def, parseFlags) < 0)
|
|
- return -1;
|
|
-
|
|
- if (virDomainDefRejectDuplicateControllers(def) < 0)
|
|
- return -1;
|
|
-
|
|
- if (virDomainDefRejectDuplicatePanics(def) < 0)
|
|
- return -1;
|
|
-
|
|
- if (virDomainDefPostParseTimer(def) < 0)
|
|
- return -1;
|
|
-
|
|
- if (virDomainDefAddImplicitDevices(def) < 0)
|
|
- return -1;
|
|
-
|
|
- /* Mark the first video as primary. If the user specified primary="yes",
|
|
- * the parser already inserted the device at def->videos[0] */
|
|
- if (def->nvideos != 0)
|
|
- def->videos[0]->primary = true;
|
|
-
|
|
- /* clean up possibly duplicated metadata entries */
|
|
- virDomainDefMetadataSanitize(def);
|
|
-
|
|
- return 0;
|
|
-}
|
|
-
|
|
-
|
|
/* Check if a drive type address $controller:$bus:$target:$unit is already
|
|
* taken by a disk or not.
|
|
*/
|
|
@@ -4358,6 +4319,45 @@ virDomainDefPostParseDeviceIterator(virD
|
|
}
|
|
|
|
|
|
+static int
|
|
+virDomainDefPostParseInternal(virDomainDefPtr def,
|
|
+ virCapsPtr caps ATTRIBUTE_UNUSED,
|
|
+ unsigned int parseFlags)
|
|
+{
|
|
+ /* verify init path for container based domains */
|
|
+ if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) {
|
|
+ virReportError(VIR_ERR_XML_ERROR, "%s",
|
|
+ _("init binary must be specified"));
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
+ if (virDomainDefPostParseMemory(def, parseFlags) < 0)
|
|
+ return -1;
|
|
+
|
|
+ if (virDomainDefRejectDuplicateControllers(def) < 0)
|
|
+ return -1;
|
|
+
|
|
+ if (virDomainDefRejectDuplicatePanics(def) < 0)
|
|
+ return -1;
|
|
+
|
|
+ if (virDomainDefPostParseTimer(def) < 0)
|
|
+ return -1;
|
|
+
|
|
+ if (virDomainDefAddImplicitDevices(def) < 0)
|
|
+ return -1;
|
|
+
|
|
+ /* Mark the first video as primary. If the user specified primary="yes",
|
|
+ * the parser already inserted the device at def->videos[0] */
|
|
+ if (def->nvideos != 0)
|
|
+ def->videos[0]->primary = true;
|
|
+
|
|
+ /* clean up possibly duplicated metadata entries */
|
|
+ virDomainDefMetadataSanitize(def);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+
|
|
int
|
|
virDomainDefPostParse(virDomainDefPtr def,
|
|
virCapsPtr caps,
|