mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
LXC: use virDomainObjInitJob()
This patch removes and replaces virLXCDomainObjInitJob() with general virDomainObjInitJob(). Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6c1dec40a2
commit
f78e59c197
@ -35,17 +35,6 @@
|
|||||||
|
|
||||||
VIR_LOG_INIT("lxc.lxc_domain");
|
VIR_LOG_INIT("lxc.lxc_domain");
|
||||||
|
|
||||||
static int
|
|
||||||
virLXCDomainObjInitJob(virLXCDomainObjPrivate *priv)
|
|
||||||
{
|
|
||||||
memset(&priv->job, 0, sizeof(priv->job));
|
|
||||||
|
|
||||||
if (virCondInit(&priv->job.cond) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virLXCDomainObjResetJob(virLXCDomainObjPrivate *priv)
|
virLXCDomainObjResetJob(virLXCDomainObjPrivate *priv)
|
||||||
{
|
{
|
||||||
@ -145,7 +134,7 @@ virLXCDomainObjPrivateAlloc(void *opaque)
|
|||||||
{
|
{
|
||||||
virLXCDomainObjPrivate *priv = g_new0(virLXCDomainObjPrivate, 1);
|
virLXCDomainObjPrivate *priv = g_new0(virLXCDomainObjPrivate, 1);
|
||||||
|
|
||||||
if (virLXCDomainObjInitJob(priv) < 0) {
|
if (virDomainObjInitJob(&priv->job, NULL) < 0) {
|
||||||
g_free(priv);
|
g_free(priv);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user