]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
destroy: Implement internal API for uml driver
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Jul 2011 07:54:28 +0000 (09:54 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Jul 2011 18:41:27 +0000 (20:41 +0200)
src/uml/uml_driver.c

index e1eedd4f3857498e7fb74448f3d6b056d7ae59c5..6d04120156a20e1b05605d216ed2b57aa0e145c6 100644 (file)
@@ -1417,12 +1417,17 @@ cleanup:
 }
 
 
-static int umlDomainDestroy(virDomainPtr dom) {
+static int
+umlDomainDestroyFlags(virDomainPtr dom,
+                      unsigned int flags)
+{
     struct uml_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
     virDomainEventPtr event = NULL;
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     umlDriverLock(driver);
     vm = virDomainFindByID(&driver->domains, dom->id);
     if (!vm) {
@@ -1453,6 +1458,12 @@ cleanup:
 }
 
 
+static int umlDomainDestroy(virDomainPtr dom)
+{
+    return umlDomainDestroyFlags(dom, 0);
+}
+
+
 static char *umlDomainGetOSType(virDomainPtr dom) {
     struct uml_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
@@ -2423,6 +2434,7 @@ static virDriver umlDriver = {
     .domainLookupByName = umlDomainLookupByName, /* 0.5.0 */
     .domainShutdown = umlDomainShutdown, /* 0.5.0 */
     .domainDestroy = umlDomainDestroy, /* 0.5.0 */
+    .domainDestroyFlags = umlDomainDestroyFlags, /* 0.9.4 */
     .domainGetOSType = umlDomainGetOSType, /* 0.5.0 */
     .domainGetMaxMemory = umlDomainGetMaxMemory, /* 0.5.0 */
     .domainSetMaxMemory = umlDomainSetMaxMemory, /* 0.5.0 */