[libvirt] [PATCH 08/12] shutdown: Implement internal API for uml driver

Michal Privoznik mprivozn at redhat.com
Thu Jul 21 20:53:57 UTC 2011


---
 src/uml/uml_driver.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 6d04120..70ef4b0 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1385,12 +1385,17 @@ cleanup:
 }
 
 
-static int umlDomainShutdown(virDomainPtr dom) {
+static int
+umlDomainShutdownFlags(virDomainPtr dom,
+                       unsigned int flags)
+{
     struct uml_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
     char *info = NULL;
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     umlDriverLock(driver);
     vm = virDomainFindByID(&driver->domains, dom->id);
     umlDriverUnlock(driver);
@@ -1418,6 +1423,13 @@ cleanup:
 
 
 static int
+umlDomainShutdown(virDomainPtr dom)
+{
+    return umlDomainShutdownFlags(dom, 0);
+}
+
+
+static int
 umlDomainDestroyFlags(virDomainPtr dom,
                       unsigned int flags)
 {
@@ -2433,6 +2445,7 @@ static virDriver umlDriver = {
     .domainLookupByUUID = umlDomainLookupByUUID, /* 0.5.0 */
     .domainLookupByName = umlDomainLookupByName, /* 0.5.0 */
     .domainShutdown = umlDomainShutdown, /* 0.5.0 */
+    .domainShutdownFlags = umlDomainShutdownFlags, /* 0.9.4 */
     .domainDestroy = umlDomainDestroy, /* 0.5.0 */
     .domainDestroyFlags = umlDomainDestroyFlags, /* 0.9.4 */
     .domainGetOSType = umlDomainGetOSType, /* 0.5.0 */
-- 
1.7.5.rc3




More information about the libvir-list mailing list