mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 16:15:19 +00:00
qemu: domain: Introduce qemuDomainStartupCleanup
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>
This commit is contained in:
parent
98bd201678
commit
4c9ce062d3
@ -1576,7 +1576,7 @@ qemuDomainSecretGraphicsPrepare(virQEMUDriverConfig *cfg,
|
||||
*
|
||||
* Removes all unnecessary data which was needed to generate 'secret' objects.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
qemuDomainSecretDestroy(virDomainObj *vm)
|
||||
{
|
||||
size_t i;
|
||||
@ -12211,3 +12211,16 @@ qemuDomainSchedCoreStop(qemuDomainObjPrivate *priv)
|
||||
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);
|
||||
}
|
||||
|
@ -925,8 +925,7 @@ int qemuDomainSecretChardevPrepare(virQEMUDriverConfig *cfg,
|
||||
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)
|
||||
|
@ -7973,7 +7973,7 @@ qemuProcessLaunch(virConnectPtr conn,
|
||||
|
||||
cleanup:
|
||||
qemuDomainSchedCoreStop(priv);
|
||||
qemuDomainSecretDestroy(vm);
|
||||
qemuDomainStartupCleanup(vm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user