diff options
author | Ján Tomko <jtomko@redhat.com> | 2016-05-11 11:57:33 +0200 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2016-05-16 09:19:59 -0400 |
commit | 2b574dcabfd1bfdeed335386faeb4fdc55a199a1 (patch) | |
tree | d91db111b9067d7a381268f77e037ae272521924 | |
parent | d460558ea808d9394c27526f1259f50a6d210c98 (diff) | |
download | libvirt-2b574dcabfd1bfdeed335386faeb4fdc55a199a1.tar.gz |
Move virDomainDefPostParseInternal after virDomainDeviceDefPostParse
Future commit will call DeviceDefPostParse on a device auto-added
in DomainDefPostParse.
(cherry picked from commit e4d131b8cb12679814b6fda159281f472b615524)
-rw-r--r-- | src/conf/domain_conf.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f76fd07484..72e9c17041 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3899,45 +3899,6 @@ virDomainDefPostParseTimer(virDomainDefPtr def) } -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. */ @@ -4352,6 +4313,45 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED, } +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, |