Re: [PATCH 03/13] destroy: Implement internal API for qemu driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



于 2011年07月21日 17:28, Michal Privoznik 写道:
---
  src/qemu/qemu_driver.c |   13 ++++++++++++-
  1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e13b63b..ddadb08 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1556,13 +1556,18 @@ cleanup:
  }


-static int qemudDomainDestroy(virDomainPtr dom) {
+static int
+qemudDomainDestroyWithFlags(virDomainPtr dom,

Suggested by Eric, and adopted in undefineFlags series,
s/qemudDomain/qemuDomain/.


+                            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
+qemudDomainDestroy(virDomainPtr dom)
+{
+    return qemudDomainDestroyWithFlags(dom, 0);
+}

  static char *qemudDomainGetOSType(virDomainPtr dom) {
      struct qemud_driver *driver = dom->conn->privateData;
@@ -8621,6 +8631,7 @@ static virDriver qemuDriver = {
      .domainShutdown = qemuDomainShutdown, /* 0.2.0 */
      .domainReboot = qemuDomainReboot, /* 0.9.3 */
      .domainDestroy = qemudDomainDestroy, /* 0.2.0 */
+    .domainDestroyWithFlags = qemudDomainDestroyWithFlags, /* 0.9.4 */
      .domainGetOSType = qemudDomainGetOSType, /* 0.2.2 */
      .domainGetMaxMemory = qemudDomainGetMaxMemory, /* 0.4.2 */
      .domainSetMaxMemory = qemudDomainSetMaxMemory, /* 0.4.2 */

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]