}
-/**
- * qemuDomainUpdateQEMUCaps:
- * @vm: domain object
- * @qemuCapsCache: cache of QEMU capabilities
- *
- * This function updates the used QEMU capabilities of @vm by querying
- * the QEMU capabilities cache.
- *
- * Returns 0 on success, -1 on error.
- */
-int
-qemuDomainUpdateQEMUCaps(virDomainObjPtr vm,
- virFileCachePtr qemuCapsCache)
-{
- qemuDomainObjPrivatePtr priv = vm->privateData;
-
- virObjectUnref(priv->qemuCaps);
- if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(qemuCapsCache,
- vm->def->virtType,
- vm->def->emulator,
- vm->def->os.machine)))
- return -1;
- return 0;
-}
-
-
char *
qemuDomainGetMachineName(virDomainObjPtr vm)
{
qemuDomainFixupCPUs(virDomainObjPtr vm,
virCPUDefPtr *origCPU);
-int
-qemuDomainUpdateQEMUCaps(virDomainObjPtr vm,
- virFileCachePtr qemuCapsCache);
-
char *
qemuDomainGetMachineName(virDomainObjPtr vm);
}
+/**
+ * qemuProcessPrepareQEMUCaps:
+ * @vm: domain object
+ * @qemuCapsCache: cache of QEMU capabilities
+ *
+ * Prepare the capabilities of a QEMU process for startup. This includes
+ * copying the caps to a static cache and potential post-processing depending
+ * on the configuration of the VM and startup process.
+ *
+ * Returns 0 on success, -1 on error.
+ */
+static int
+qemuProcessPrepareQEMUCaps(virDomainObjPtr vm,
+ virFileCachePtr qemuCapsCache)
+{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
+
+ virObjectUnref(priv->qemuCaps);
+ if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(qemuCapsCache,
+ vm->def->virtType,
+ vm->def->emulator,
+ vm->def->os.machine)))
+ return -1;
+
+ return 0;
+}
+
+
/**
* qemuProcessInit:
*
}
VIR_DEBUG("Determining emulator version");
- if (qemuDomainUpdateQEMUCaps(vm, driver->qemuCapsCache) < 0)
+ if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache) < 0)
goto cleanup;
if (flags & VIR_QEMU_PROCESS_START_STANDALONE)