mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemu: domain: Add helper to access vm->privateData->agent
As in commit 88dc7e0c2fb, the helper can be used in cases where the function actually does not access anyting in the private data besides the agent.
This commit is contained in:
parent
80a59b4aae
commit
31fea86564
@ -1872,6 +1872,18 @@ qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* qemuDomainGetAgent:
|
||||
* @vm: domain object
|
||||
*
|
||||
* Returns the agent pointer of @vm;
|
||||
*/
|
||||
qemuAgentPtr
|
||||
qemuDomainGetAgent(virDomainObjPtr vm)
|
||||
{
|
||||
return (((qemuDomainObjPrivatePtr)(vm->privateData))->agent);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* obj must be locked before calling
|
||||
|
@ -298,6 +298,7 @@ int qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
|
||||
qemuAgentPtr qemuDomainGetAgent(virDomainObjPtr vm);
|
||||
void qemuDomainObjEnterAgent(virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
void qemuDomainObjExitAgent(virDomainObjPtr obj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user