[libvirt] [PATCH] lxc: Refresh capabilities if they have never been initalized
Cole Robinson
crobinso at redhat.com
Mon Dec 9 18:15:02 UTC 2019
Adjust virLXCDriverGetCapabilities to fill in driver->caps if it has
never been set, regardless of the passed 'refresh' boolean.
This fixes LXC XML startup parsing for me
Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
src/lxc/lxc_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 2df1537b22..803176f52b 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -186,7 +186,7 @@ virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
bool refresh)
{
virCapsPtr ret;
- if (refresh) {
+ if (refresh || !driver->caps) {
virCapsPtr caps = NULL;
if ((caps = virLXCDriverCapsInit(driver)) == NULL)
return NULL;
--
2.23.0
More information about the libvir-list
mailing list