mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
libxl: use virDomainObjInitJob()
This patch removes and replaces libxlDomainObjInitJob() with general virDomainObjInitJob(). Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
260a091982
commit
6c1dec40a2
@ -44,19 +44,6 @@
|
||||
VIR_LOG_INIT("libxl.libxl_domain");
|
||||
|
||||
|
||||
static int
|
||||
libxlDomainObjInitJob(libxlDomainObjPrivate *priv)
|
||||
{
|
||||
memset(&priv->job, 0, sizeof(priv->job));
|
||||
|
||||
if (virCondInit(&priv->job.cond) < 0)
|
||||
return -1;
|
||||
|
||||
priv->job.current = virDomainJobDataInit(NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
libxlDomainObjResetJob(libxlDomainObjPrivate *priv)
|
||||
{
|
||||
@ -190,12 +177,14 @@ libxlDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (libxlDomainObjInitJob(priv) < 0) {
|
||||
if (virDomainObjInitJob(&priv->job, NULL) < 0) {
|
||||
virChrdevFree(priv->devs);
|
||||
g_free(priv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
priv->job.current = virDomainJobDataInit(NULL);
|
||||
|
||||
return priv;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user