mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
lxc: Store 'driver' in VM private data
Similarly to the qemu driver if we store the immutable driver pointer in the VM private data struct we don't have to questionably pass it through opaque pointers to callbacks. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f5c8abf176
commit
6871553c3f
@ -143,7 +143,7 @@ virLXCDomainObjEndJob(virLXCDriver *driver G_GNUC_UNUSED,
|
||||
|
||||
|
||||
static void *
|
||||
virLXCDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
|
||||
virLXCDomainObjPrivateAlloc(void *opaque)
|
||||
{
|
||||
virLXCDomainObjPrivate *priv = g_new0(virLXCDomainObjPrivate, 1);
|
||||
|
||||
@ -152,6 +152,8 @@ virLXCDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
priv->driver = opaque;
|
||||
|
||||
return priv;
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ struct virLXCDomainJobObj {
|
||||
|
||||
typedef struct _virLXCDomainObjPrivate virLXCDomainObjPrivate;
|
||||
struct _virLXCDomainObjPrivate {
|
||||
virLXCDriver *driver;
|
||||
virLXCMonitor *monitor;
|
||||
bool doneStopEvent;
|
||||
int stopReason;
|
||||
|
Loading…
x
Reference in New Issue
Block a user