The new helper qemuDomainStartupCleanup is used to perform cleanup after
a startup of a VM (successful or not). The initial implementation just
calls qemuDomainSecretDestroy, which can be un-exported.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
*
* Removes all unnecessary data which was needed to generate 'secret' objects.
*/
-void
+static void
qemuDomainSecretDestroy(virDomainObj *vm)
{
size_t i;
priv->schedCoreChildPID = -1;
}
}
+
+
+/**
+ * qemuDomainStartupCleanup:
+ *
+ * Performs a cleanup of data which is not required after a startup of a VM
+ * (successful or not).
+ */
+void
+qemuDomainStartupCleanup(virDomainObj *vm)
+{
+ qemuDomainSecretDestroy(vm);
+}
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4);
-void qemuDomainSecretDestroy(virDomainObj *vm)
- ATTRIBUTE_NONNULL(1);
+void qemuDomainStartupCleanup(virDomainObj *vm);
int qemuDomainSecretPrepare(virQEMUDriver *driver,
virDomainObj *vm)
cleanup:
qemuDomainSchedCoreStop(priv);
- qemuDomainSecretDestroy(vm);
+ qemuDomainStartupCleanup(vm);
return ret;
}