mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemuDomainDefValidateDiskLunSource: Unbreak error messages
Simplify looking for the error messages. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
fa8ce012a3
commit
5ccb39616f
@ -9840,15 +9840,13 @@ qemuDomainDefValidateDiskLunSource(const virStorageSource *src)
|
|||||||
if (virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK) {
|
if (virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK) {
|
||||||
if (src->protocol != VIR_STORAGE_NET_PROTOCOL_ISCSI) {
|
if (src->protocol != VIR_STORAGE_NET_PROTOCOL_ISCSI) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("disk device='lun' is not supported "
|
_("disk device='lun' is not supported for protocol='%s'"),
|
||||||
"for protocol='%s'"),
|
|
||||||
virStorageNetProtocolTypeToString(src->protocol));
|
virStorageNetProtocolTypeToString(src->protocol));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (!virStorageSourceIsBlockLocal(src)) {
|
} else if (!virStorageSourceIsBlockLocal(src)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("disk device='lun' is only valid for block "
|
_("disk device='lun' is only valid for block type disk source"));
|
||||||
"type disk source"));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user