mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-10 07:20:02 +00:00
virfile: Switch to virReportSystemError after failed VIR_CLOSE()
VIR_CLOSE() sets errno on failure so it's better to use virReportSystemError() than plain virReportError() as the former reports errno value too. Signed-off-by: Adam Julis <ajulis@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
04397de2a1
commit
969353f978
@ -467,7 +467,7 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (VIR_CLOSE(pipefd[!output]) < 0) {
|
if (VIR_CLOSE(pipefd[!output]) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("unable to close pipe"));
|
virReportSystemError(errno, "%s", _("unable to close pipe"));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user