提交 3b558c6b 编写于 作者: D Daniel P. Berrangé

hyperv: handle missing switch enum cases

Ensure all enum cases are listed in switch statements. This improves
debug logging integration with openwsman.
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 7c8f1436
......@@ -1656,13 +1656,27 @@ hypervDebugHandler(const char *message, debug_level_e level,
switch (level) {
case DEBUG_LEVEL_ERROR:
case DEBUG_LEVEL_CRITICAL:
VIR_ERROR(_("openwsman error: %s"), message);
case DEBUG_LEVEL_ALWAYS:
VIR_ERROR(_("openwsman: %s"), message);
break;
case DEBUG_LEVEL_WARNING:
VIR_WARN("openwsman warning: %s", message);
VIR_WARN("openwsman: %s", message);
break;
case DEBUG_LEVEL_MESSAGE:
VIR_INFO("openwsman: %s", message);
break;
case DEBUG_LEVEL_INFO:
VIR_INFO("openwsman: %s", message);
break;
case DEBUG_LEVEL_DEBUG:
VIR_DEBUG("openwsman: %s", message);
break;
case DEBUG_LEVEL_NONE:
default:
/* Ignore the rest */
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册