@@ -3842,9 +3842,6 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
if (virDomainDefPostParseMemory(def, parseFlags) < 0)
return -1;
- if (virDomainDefAddConsoleCompat(def) < 0)
- return -1;
-
if (virDomainDefRejectDuplicateControllers(def) < 0)
return -1;
@@ -3854,7 +3851,7 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
if (virDomainDefPostParseTimer(def) < 0)
return -1;
- if (virDomainDefAddImplicitControllers(def) < 0)
+ if (virDomainDefAddImplicitDevices(def) < 0)
return -1;
/* clean up possibly duplicated metadata entries */
@@ -18216,7 +18213,7 @@ virDomainDefMaybeAddSmartcardController(virDomainDefPtr def)
* in the XML. This is for compat with existing apps which will
* not know/care about <controller> info in the XML
*/
-int
+static int
virDomainDefAddImplicitControllers(virDomainDefPtr def)
{
if (virDomainDefAddDiskControllersForType(def,
@@ -18251,6 +18248,18 @@ virDomainDefAddImplicitControllers(virDomainDefPtr def)
return 0;
}
+int
+virDomainDefAddImplicitDevices(virDomainDefPtr def)
+{
+ if (virDomainDefAddConsoleCompat(def) < 0)
+ return -1;
+
+ if (virDomainDefAddImplicitControllers(def) < 0)
+ return -1;
+
+ return 0;
+}
+
virDomainIOThreadIDDefPtr
virDomainIOThreadIDFind(virDomainDefPtr def,
unsigned int iothread_id)
@@ -2718,7 +2718,7 @@ virDomainObjPtr virDomainObjParseFile(const char *filename,
bool virDomainDefCheckABIStability(virDomainDefPtr src,
virDomainDefPtr dst);
-int virDomainDefAddImplicitControllers(virDomainDefPtr def);
+int virDomainDefAddImplicitDevices(virDomainDefPtr def);
virDomainIOThreadIDDefPtr virDomainIOThreadIDFind(virDomainDefPtr def,
unsigned int iothread_id);
@@ -197,7 +197,7 @@ virDomainControllerRemove;
virDomainControllerTypeToString;
virDomainCpuPlacementModeTypeFromString;
virDomainCpuPlacementModeTypeToString;
-virDomainDefAddImplicitControllers;
+virDomainDefAddImplicitDevices;
virDomainDefCheckABIStability;
virDomainDefCheckDuplicateDiskInfo;
virDomainDefCheckUnsupportedMemoryHotplug;
@@ -13862,7 +13862,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
VIR_FREE(nics);
- if (virDomainDefAddImplicitControllers(def) < 0)
+ if (virDomainDefAddImplicitDevices(def) < 0)
goto error;
if (virDomainDefPostParse(def, qemuCaps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
@@ -8074,7 +8074,7 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
/* vmdef has the pointer. Generic codes for vmdef will do all jobs */
dev->data.disk = NULL;
if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO)
- if (virDomainDefAddImplicitControllers(vmdef) < 0)
+ if (virDomainDefAddImplicitDevices(vmdef) < 0)
return -1;
if (qemuDomainAssignAddresses(vmdef, qemuCaps, NULL) < 0)
return -1;
@@ -8099,7 +8099,7 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
if (virDomainHostdevInsert(vmdef, hostdev))
return -1;
dev->data.hostdev = NULL;
- if (virDomainDefAddImplicitControllers(vmdef) < 0)
+ if (virDomainDefAddImplicitDevices(vmdef) < 0)
return -1;
if (qemuDomainAssignAddresses(vmdef, qemuCaps, NULL) < 0)
return -1;
@@ -8141,7 +8141,7 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
if (qemuDomainChrInsert(vmdef, dev->data.chr) < 0)
return -1;
dev->data.chr = NULL;
- if (virDomainDefAddImplicitControllers(vmdef) < 0)
+ if (virDomainDefAddImplicitDevices(vmdef) < 0)
return -1;
if (qemuDomainAssignAddresses(vmdef, qemuCaps, NULL) < 0)
return -1;
@@ -1689,7 +1689,7 @@ virVMXParseConfig(virVMXContext *ctx,
}
/* def:controllers */
- if (virDomainDefAddImplicitControllers(def) < 0) {
+ if (virDomainDefAddImplicitDevices(def) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not add controllers"));
goto cleanup;
}
@@ -1350,7 +1350,7 @@ prlsdkLoadDomain(vzConnPtr privconn,
if (prlsdkGetDomainState(sdkdom, &domainState) < 0)
goto error;
- if (virDomainDefAddImplicitControllers(def) < 0)
+ if (virDomainDefAddImplicitDevices(def) < 0)
goto error;
if (def->ngraphics > 0) {