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

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.
上级 82ba4110
...@@ -980,9 +980,13 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk) ...@@ -980,9 +980,13 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk)
virStorageNetProtocolTypeToString(disk->src->protocol)); virStorageNetProtocolTypeToString(disk->src->protocol));
goto error; 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; goto error;
} }
if (disk->wwn) { if (disk->wwn) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Setting wwn is not supported for lun device")); _("Setting wwn is not supported for lun device"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册