提交 4f11a1ea 编写于 作者: P Peter Krempa

qemu: Use virStorageSourceIsEmpty in qemuDomainBlockCommit

The block commit API checked 'disk->src->path' to see whether there
is a reasonable disk source to be committed. As the top image can be
e.g. backed by NBD the check is not good enough. Replace it by
virStorageSourceIsEmpty.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 08f23b8f
......@@ -17979,7 +17979,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
if (!(device = qemuAliasDiskDriveFromDisk(disk)))
goto endjob;
if (!disk->src->path) {
if (virStorageSourceIsEmpty(disk->src)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("disk %s has no source file to be committed"),
disk->dst);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册