mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
qemu & hypervisor: move qemuDomainObjClearJob() into hypervisor
This patch moves qemuDomainObjClearJob() as virDomainObjClearJob() into hypervisor in order to be used by other hypervisors as well. Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
635bb08025
commit
d5b677792c
@ -206,3 +206,17 @@ virDomainObjPreserveJob(virDomainJobObj *currJob,
|
||||
virDomainObjResetAsyncJob(currJob);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
virDomainObjClearJob(virDomainJobObj *job)
|
||||
{
|
||||
virDomainObjResetJob(job);
|
||||
virDomainObjResetAsyncJob(job);
|
||||
g_clear_pointer(&job->current, virDomainJobDataFree);
|
||||
g_clear_pointer(&job->completed, virDomainJobDataFree);
|
||||
virCondDestroy(&job->cond);
|
||||
virCondDestroy(&job->asyncCond);
|
||||
|
||||
if (job->cb)
|
||||
g_clear_pointer(&job->privateData, job->cb->freeJobPrivate);
|
||||
}
|
||||
|
@ -217,3 +217,6 @@ void virDomainObjResetAsyncJob(virDomainJobObj *job);
|
||||
|
||||
int virDomainObjPreserveJob(virDomainJobObj *currJob,
|
||||
virDomainJobObj *job);
|
||||
|
||||
void virDomainObjClearJob(virDomainJobObj *job);
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virDomainJobObj, virDomainObjClearJob);
|
||||
|
@ -1594,6 +1594,7 @@ virDomainJobDataInit;
|
||||
virDomainJobStatusToType;
|
||||
virDomainJobTypeFromString;
|
||||
virDomainJobTypeToString;
|
||||
virDomainObjClearJob;
|
||||
virDomainObjInitJob;
|
||||
virDomainObjPreserveJob;
|
||||
virDomainObjResetAgentJob;
|
||||
|
@ -1719,7 +1719,7 @@ qemuDomainObjPrivateFree(void *data)
|
||||
qemuDomainObjPrivateDataClear(priv);
|
||||
|
||||
virObjectUnref(priv->monConfig);
|
||||
qemuDomainObjClearJob(&priv->job);
|
||||
virDomainObjClearJob(&priv->job);
|
||||
g_free(priv->lockState);
|
||||
g_free(priv->origname);
|
||||
|
||||
|
@ -185,20 +185,6 @@ qemuDomainObjRestoreAsyncJob(virDomainObj *vm,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
qemuDomainObjClearJob(virDomainJobObj *job)
|
||||
{
|
||||
virDomainObjResetJob(job);
|
||||
virDomainObjResetAsyncJob(job);
|
||||
g_clear_pointer(&job->current, virDomainJobDataFree);
|
||||
g_clear_pointer(&job->completed, virDomainJobDataFree);
|
||||
virCondDestroy(&job->cond);
|
||||
virCondDestroy(&job->asyncCond);
|
||||
|
||||
if (job->cb)
|
||||
g_clear_pointer(&job->privateData, job->cb->freeJobPrivate);
|
||||
}
|
||||
|
||||
bool
|
||||
qemuDomainTrackJob(virDomainJob job)
|
||||
{
|
||||
|
@ -133,9 +133,6 @@ int qemuDomainJobDataToParams(virDomainJobData *jobData,
|
||||
|
||||
bool qemuDomainTrackJob(virDomainJob job);
|
||||
|
||||
void qemuDomainObjClearJob(virDomainJobObj *job);
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virDomainJobObj, qemuDomainObjClearJob);
|
||||
|
||||
int
|
||||
qemuDomainObjPrivateXMLFormatJob(virBuffer *buf,
|
||||
virDomainObj *vm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user