lxc_controller: Access correct union member in virLXCControllerSetupHostdevCaps()

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2023-09-13 14:41:00 +02:00
parent f26c0018ba
commit d406caefd1

View File

@ -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;
}
}