From 969353f97847394fca1dcd5f2d7af17fae7a1cbc Mon Sep 17 00:00:00 2001 From: Adam Julis Date: Thu, 22 Feb 2024 10:14:35 +0100 Subject: [PATCH] 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 Reviewed-by: Michal Privoznik --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 9463833d31..deaf4555fd 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -467,7 +467,7 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags) goto error; 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; }