提交 88dc7e0c 编写于 作者: P Peter Krempa

qemu: domain: Introduce helper to retrieve domain monitor object

In some cases where the function does not need to access the private
data this helper may be used to retrieve the monitor object.
上级 3888dcaa
......@@ -3034,3 +3034,16 @@ qemuDomainMemoryDeviceAlignSize(virDomainMemoryDefPtr mem)
{
mem->size = VIR_ROUND_UP(mem->size, 1024);
}
/**
* qemuDomainGetMonitor:
* @vm: domain object
*
* Returns the monitor pointer corresponding to the domain object @vm.
*/
qemuMonitorPtr
qemuDomainGetMonitor(virDomainObjPtr vm)
{
return ((qemuDomainObjPrivatePtr) vm->privateData)->mon;
}
......@@ -252,6 +252,8 @@ void qemuDomainObjDiscardAsyncJob(virQEMUDriverPtr driver,
virDomainObjPtr obj);
void qemuDomainObjReleaseAsyncJob(virDomainObjPtr obj);
qemuMonitorPtr qemuDomainGetMonitor(virDomainObjPtr vm)
ATTRIBUTE_NONNULL(1);
void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
virDomainObjPtr obj)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册