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

index e693e769774c8575ecb89b819c7eaf2d8739efe1..ff16aae072e86102e97b061fb9aa5a7b0fb03f02 100644 (file)
@@ -3497,7 +3497,8 @@ phypDomainGetState(virDomainPtr dom,
 }
 
 static int
-phypDomainDestroy(virDomainPtr dom)
+phypDomainDestroyFlags(virDomainPtr dom,
+                       unsigned int flags)
 {
     int result = -1;
     ConnectionData *connection_data = dom->conn->networkPrivateData;
@@ -3509,6 +3510,8 @@ phypDomainDestroy(virDomainPtr dom)
     char *ret = NULL;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
+    virCheckFlags(0, -1);
+
     virBufferAddLit(&buf, "rmsyscfg");
     if (system_type == HMC)
         virBufferAsprintf(&buf, " -m %s", managed_system);
@@ -3530,6 +3533,12 @@ cleanup:
     return result;
 }
 
+static int
+phypDomainDestroy(virDomainPtr dom)
+{
+    return phypDomainDestroyFlags(dom, 0);
+}
+
 static int
 phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
 {
@@ -3763,6 +3772,7 @@ static virDriver phypDriver = {
     .domainShutdown = phypDomainShutdown, /* 0.7.0 */
     .domainReboot = phypDomainReboot, /* 0.9.1 */
     .domainDestroy = phypDomainDestroy, /* 0.7.3 */
+    .domainDestroyFlags = phypDomainDestroyFlags, /* 0.9.4 */
     .domainGetInfo = phypDomainGetInfo, /* 0.7.0 */
     .domainGetState = phypDomainGetState, /* 0.9.2 */
     .domainSetVcpus = phypDomainSetCPU, /* 0.7.3 */