From 2ed65b6801e0c7eb24d32b338f035c5b5d684205 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 29 May 2019 10:18:56 -0400 Subject: [PATCH 22/86] Fix dbglog_write() to always return the status of write() Signed-off-by: Peter Jones --- src/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.c b/src/error.c index 5eaee84599a..a77b0df1feb 100644 --- a/src/error.c +++ b/src/error.c @@ -185,7 +185,7 @@ dbglog_write(void *cookie UNUSED, const char *buf, size_t size) ret = fwrite(buf, 1, size, log); } else if (efi_dbglog_fd >= 0) { lseek(efi_dbglog_fd, 0, SEEK_SET); - write(efi_dbglog_fd, buf, size); + ret = write(efi_dbglog_fd, buf, size); } return ret; } -- 2.24.1