mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemu: Avoid using global qemu_driver in event handlers
We will have to pass a mock-up of the driver when testing monitor events.
This commit is contained in:
1 parent
6ac7cc8edc
commit
809ee6bad4
5 files changed
+130
-76
No files matched your search
@@ -708,14 +708,16 @@ error:
|
||||
|
||||
static void
|
||||
qemuMonitorTestEOFNotify(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED)
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuMonitorTestErrorNotify(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED)
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -870,7 +872,8 @@ qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt)
|
||||
if (!(test->mon = qemuMonitorOpen(test->vm,
|
||||
&src,
|
||||
json,
|
||||
&qemuMonitorTestCallbacks)))
|
||||
&qemuMonitorTestCallbacks,
|
||||
NULL)))
|
||||
goto error;
|
||||
|
||||
virObjectLock(test->mon);
|
||||
|
||||
Reference in new issue
Block a user