1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

destroy: Implement internal API for qemu driver

This commit is contained in:
Michal Privoznik 2011-07-20 18:41:24 +02:00
parent ca79a4fb51
commit 427eaf13e2

View File

@ -1556,13 +1556,18 @@ cleanup:
}
static int qemudDomainDestroy(virDomainPtr dom) {
static int
qemuDomainDestroyFlags(virDomainPtr dom,
unsigned int flags)
{
struct qemud_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
virDomainEventPtr event = NULL;
qemuDomainObjPrivatePtr priv;
virCheckFlags(0, -1);
qemuDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
@ -1620,6 +1625,11 @@ cleanup:
return ret;
}
static int
qemuDomainDestroy(virDomainPtr dom)
{
return qemuDomainDestroyFlags(dom, 0);
}
static char *qemudDomainGetOSType(virDomainPtr dom) {
struct qemud_driver *driver = dom->conn->privateData;
@ -8881,7 +8891,8 @@ static virDriver qemuDriver = {
.domainResume = qemudDomainResume, /* 0.2.0 */
.domainShutdown = qemuDomainShutdown, /* 0.2.0 */
.domainReboot = qemuDomainReboot, /* 0.9.3 */
.domainDestroy = qemudDomainDestroy, /* 0.2.0 */
.domainDestroy = qemuDomainDestroy, /* 0.2.0 */
.domainDestroyFlags = qemuDomainDestroyFlags, /* 0.9.4 */
.domainGetOSType = qemudDomainGetOSType, /* 0.2.2 */
.domainGetMaxMemory = qemudDomainGetMaxMemory, /* 0.4.2 */
.domainSetMaxMemory = qemudDomainSetMaxMemory, /* 0.4.2 */