mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemu: command: Use more appropriate checking function for block devices
In qemuCheckDiskConfig would now use virDomainDiskSourceIsBlockType just as a glorified version of virStorageSourceIsBlockLocal that reports error messages. Replace it with the latter including the message for clarity.
This commit is contained in:
parent
82ba41108a
commit
c240335b88
@ -980,9 +980,13 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk)
|
||||
virStorageNetProtocolTypeToString(disk->src->protocol));
|
||||
goto error;
|
||||
}
|
||||
} else if (!virDomainDiskSourceIsBlockType(disk->src, true)) {
|
||||
} else if (!virStorageSourceIsBlockLocal(disk->src)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("disk device='lun' is only valid for block "
|
||||
"type disk source"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (disk->wwn) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Setting wwn is not supported for lun device"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user