提交 49826eda 编写于 作者: O Osier Yang

storage: Do not override the exact error of createRawFile

virStorageBackendCreateRaw: createRawFile already reported the
exact error.

Before the fix:

error: Failed to create vol vol-create.img
error: cannot create path '/var/lib/libvirt/images/vol-create.img': Unknown error 18446744073709551597

After the fix:

error: Failed to create vol vol-create.img
error: cannot fill file '/var/lib/libvirt/images/vol-create.img': No space left on device
上级 7976d96d
......@@ -399,12 +399,9 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED,
goto cleanup;
}
if ((ret = createRawFile(fd, vol, inputvol)) < 0) {
virReportSystemError(-fd,
_("cannot create path '%s'"),
vol->target.path);
if ((ret = createRawFile(fd, vol, inputvol)) < 0)
/* createRawFile already reported the exact error. */
ret = -1;
}
cleanup:
VIR_FORCE_CLOSE(fd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册