mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemu: Save qemu driver in qemuDomainObjPrivateData
This way we can finally make it static and not use any externs anywhere. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
6e6faf6d62
commit
2e6ecba1bc
@ -1662,7 +1662,7 @@ qemuDomainClearPrivatePaths(virDomainObjPtr vm)
|
||||
|
||||
|
||||
static void *
|
||||
qemuDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
qemuDomainObjPrivateAlloc(void *opaque)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
|
||||
@ -1679,6 +1679,7 @@ qemuDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
||||
goto error;
|
||||
|
||||
priv->migMaxBandwidth = QEMU_DOMAIN_MIG_BANDWIDTH_MAX;
|
||||
priv->driver = opaque;
|
||||
|
||||
return priv;
|
||||
|
||||
|
@ -217,6 +217,8 @@ struct _qemuDomainSecretInfo {
|
||||
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate;
|
||||
typedef qemuDomainObjPrivate *qemuDomainObjPrivatePtr;
|
||||
struct _qemuDomainObjPrivate {
|
||||
virQEMUDriverPtr driver;
|
||||
|
||||
struct qemuDomainJobObj job;
|
||||
|
||||
virBitmapPtr namespaces;
|
||||
|
@ -159,7 +159,7 @@ static int qemuGetDHCPInterfaces(virDomainPtr dom,
|
||||
virDomainObjPtr vm,
|
||||
virDomainInterfacePtr **ifaces);
|
||||
|
||||
virQEMUDriverPtr qemu_driver = NULL;
|
||||
static virQEMUDriverPtr qemu_driver;
|
||||
|
||||
|
||||
static void
|
||||
|
@ -120,9 +120,6 @@ qemuProcessRemoveDomainStatus(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
/* XXX figure out how to remove this */
|
||||
extern virQEMUDriverPtr qemu_driver;
|
||||
|
||||
/*
|
||||
* This is a callback registered with a qemuAgentPtr instance,
|
||||
* and to be invoked when the agent console hits an end of file
|
||||
@ -518,9 +515,9 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
static void
|
||||
qemuProcessFakeReboot(void *opaque)
|
||||
{
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainObjPtr vm = opaque;
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
virQEMUDriverPtr driver = priv->driver;
|
||||
virObjectEventPtr event = NULL;
|
||||
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
|
||||
virDomainRunningReason reason = VIR_DOMAIN_RUNNING_BOOTED;
|
||||
|
Loading…
Reference in New Issue
Block a user