The point of virLXCControllerSetupHostdevCaps() is to access
.caps union member of given <hostdev/> source. And it does so in
the switch, but then, when reporting an error the .subsys member
is accessed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/lxc/lxc_controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index d79b8e1dd6..6c20429998 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -1807,7 +1807,7 @@ virLXCControllerSetupHostdevCaps(virDomainDef *vmDef,
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported host device mode %1$s"),
- virDomainHostdevCapsTypeToString(def->source.subsys.type));
+ virDomainHostdevCapsTypeToString(def->source.caps.type));
return -1;
}
}
--
2.41.0