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>
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
typedef struct _bhyveDomainObjPrivate bhyveDomainObjPrivate;
struct _bhyveDomainObjPrivate {
+ struct _bhyveConn *driver;
+
virDomainPCIAddressSet *pciaddrs;
bool persistentAddrs;