mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user