提交 62b4afb2 编写于 作者: P Peter Krempa

qemu: Improve errors in qemuDomainBlockResize

Remove the pointless "empty path" check and use a better error message
if the disk was not found.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 8f15f195
......@@ -10963,12 +10963,6 @@ qemuDomainBlockResize(virDomainPtr dom,
virCheckFlags(VIR_DOMAIN_BLOCK_RESIZE_BYTES, -1);
if (path[0] == '\0') {
virReportError(VIR_ERR_INVALID_ARG,
"%s", _("empty path"));
return -1;
}
/* We prefer operating on bytes. */
if ((flags & VIR_DOMAIN_BLOCK_RESIZE_BYTES) == 0) {
if (size > ULLONG_MAX / 1024) {
......@@ -10996,7 +10990,7 @@ qemuDomainBlockResize(virDomainPtr dom,
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
_("invalid path: %s"), path);
_("disk '%s' was not found in the domain config"), path);
goto endjob;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册