提交 0e66f066 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 9fc616cc
...@@ -20743,10 +20743,14 @@ qemuDomainGetResctrlMonData(virQEMUDriverPtr driver, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册