1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

lxcProcessAutoDestroy: Use 'driver' from VM private data

Access the 'driver' struct from the private data rather than the passed
opaque pointer in preparation to remove the opaque pointer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-05-02 15:18:40 +02:00
parent 02fe5fe298
commit 2cada2c31c

View File

@ -63,15 +63,14 @@ VIR_LOG_INIT("lxc.lxc_process");
static void
lxcProcessAutoDestroy(virDomainObj *dom,
virConnectPtr conn,
void *opaque)
void *opaque G_GNUC_UNUSED)
{
virLXCDriver *driver = opaque;
virObjectEvent *event = NULL;
virLXCDomainObjPrivate *priv;
virLXCDomainObjPrivate *priv = dom->privateData;
virLXCDriver *driver = priv->driver;
VIR_DEBUG("driver=%p dom=%s conn=%p", driver, dom->def->name, conn);
priv = dom->privateData;
VIR_DEBUG("Killing domain");
virLXCProcessStop(driver, dom, VIR_DOMAIN_SHUTOFF_DESTROYED);
virDomainAuditStop(dom, "destroyed");