[PATCH 02/13] libxl: move libxlDomainManagedSavePath to libxl_domain

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

 



Move libxlDomainManagedSavePath from libxl_driver to libxl_domain
for use by other libxl modules.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/libxl/libxl_domain.c | 10 ++++++++++
 src/libxl/libxl_domain.h |  4 ++++
 src/libxl/libxl_driver.c | 10 ----------
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 65219df..b83d1fa 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -545,3 +545,13 @@ libxlDomainEventQueue(libxlDriverPrivatePtr driver, virObjectEventPtr event)
 {
     virObjectEventStateQueue(driver->domainEventState, event);
 }
+
+char *
+libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm) {
+    char *ret;
+    libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
+
+    ignore_value(virAsprintf(&ret, "%s/%s.save", cfg->saveDir, vm->def->name));
+    virObjectUnref(cfg);
+    return ret;
+}
diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h
index dd57e57..5558009 100644
--- a/src/libxl/libxl_domain.h
+++ b/src/libxl/libxl_domain.h
@@ -95,4 +95,8 @@ void
 libxlDomainEventQueue(libxlDriverPrivatePtr driver,
                       virObjectEventPtr event);
 
+char *
+libxlDomainManagedSavePath(libxlDriverPrivatePtr driver,
+                           virDomainObjPtr vm);
+
 #endif /* LIBXL_DOMAIN_H */
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 511fde6..ef623d5 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -161,16 +161,6 @@ cleanup:
     return ret;
 }
 
-static char *
-libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm) {
-    char *ret;
-    libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
-
-    ignore_value(virAsprintf(&ret, "%s/%s.save", cfg->saveDir, vm->def->name));
-    virObjectUnref(cfg);
-    return ret;
-}
-
 /*
  * This internal function expects the driver lock to already be held on
  * entry.
-- 
1.8.1.4

--
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]