Move libxlDomainManagedSavePath from libxl_driver to libxl_domain
for use by other libxl modules.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
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 e5a5720..04f26f8 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -554,3 +554,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 1c4d61b..db7e954 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -164,16 +164,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