Return 0 instead of ERR_NO_SUPPORT to avoid spamming daemon logs
when 'virsh dominfo' is run.
https://bugzilla.redhat.com/show_bug.cgi?id=1095637
---
src/lxc/lxc_driver.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 07ddce3..b5aa1cc 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -5717,6 +5717,29 @@ lxcNodeAllocPages(virConnectPtr conn,
}
+static int
+lxcDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
+{
+ virDomainObjPtr vm = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = lxcDomObjFromDomain(dom)))
+ return ret;
+
+ if (virDomainHasManagedSaveImageEnsureACL(dom->conn, vm->def) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ if (vm)
+ virObjectUnlock(vm);
+ return ret;
+}
+
+
/* Function Tables */
static virHypervisorDriver lxcDriver = {
.no = VIR_DRV_LXC,
@@ -5810,6 +5833,7 @@ static virHypervisorDriver lxcDriver = {
.domainLxcOpenNamespace = lxcDomainLxcOpenNamespace, /* 1.0.2 */
.nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */
+ .domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.12 */
};
static virStateDriver lxcStateDriver = {
--
2.0.4