提交 df936185 编写于 作者: P Peter Krempa

qemu: command: Report error when formatting network source with protocol _NONE

The function that formats the string for network drives would return
error code but did not set the error message when called on storage
source with VIR_STORAGE_NET_PROTOCOL_LAST or _NONE.

Report an error in this case if it would ever be called in that way.
上级 237ffd1b
......@@ -3264,6 +3264,9 @@ qemuBuildNetworkDriveURI(virStorageSourcePtr src,
case VIR_STORAGE_NET_PROTOCOL_LAST:
case VIR_STORAGE_NET_PROTOCOL_NONE:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unexpected network protocol '%s'"),
virStorageNetProtocolTypeToString(src->protocol));
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册