mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemuDomainGetResctrlMonData: Switch to switch()
This way it is obvious when adding a new resource control type that stats helper func needs to be updated too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9fc616cc10
commit
0e66f0669a
@ -20743,10 +20743,14 @@ qemuDomainGetResctrlMonData(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
caps = virQEMUDriverGetCapabilities(driver, false);
|
caps = virQEMUDriverGetCapabilities(driver, false);
|
||||||
|
|
||||||
if (tag == VIR_RESCTRL_MONITOR_TYPE_CACHE) {
|
switch (tag) {
|
||||||
|
case VIR_RESCTRL_MONITOR_TYPE_CACHE:
|
||||||
if (caps->host.cache.monitor)
|
if (caps->host.cache.monitor)
|
||||||
features = caps->host.cache.monitor->features;
|
features = caps->host.cache.monitor->features;
|
||||||
} else {
|
break;
|
||||||
|
case VIR_RESCTRL_MONITOR_TYPE_MEMBW:
|
||||||
|
case VIR_RESCTRL_MONITOR_TYPE_UNSUPPORT:
|
||||||
|
case VIR_RESCTRL_MONITOR_TYPE_LAST:
|
||||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||||
_("Unsupported resctrl monitor type"));
|
_("Unsupported resctrl monitor type"));
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user