mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
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.
This commit is contained in:
parent
237ffd1b1d
commit
df9361859d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user