Blame SOURCES/0022-Fix-dbglog_write-to-always-return-the-status-of-writ.patch

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