mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 17:18:01 +03:00
bhyve: 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
49ef0f95c6
commit
f5c8abf176
@ -34,9 +34,13 @@
|
||||
VIR_LOG_INIT("bhyve.bhyve_domain");
|
||||
|
||||
static void *
|
||||
bhyveDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
|
||||
bhyveDomainObjPrivateAlloc(void *opaque)
|
||||
{
|
||||
return g_new0(bhyveDomainObjPrivate, 1);
|
||||
bhyveDomainObjPrivate *priv = g_new0(bhyveDomainObjPrivate, 1);
|
||||
|
||||
priv->driver = opaque;
|
||||
|
||||
return priv;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -27,6 +27,8 @@
|
||||
|
||||
typedef struct _bhyveDomainObjPrivate bhyveDomainObjPrivate;
|
||||
struct _bhyveDomainObjPrivate {
|
||||
struct _bhyveConn *driver;
|
||||
|
||||
virDomainPCIAddressSet *pciaddrs;
|
||||
bool persistentAddrs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user