Blame SOURCES/0019-Fix-dbglog_seek-to-update-the-offset.patch

b15ea1
From ee17f35cc79a865d700c78f783a7aa886a89dc1d Mon Sep 17 00:00:00 2001
b15ea1
From: Peter Jones <pjones@redhat.com>
b15ea1
Date: Wed, 29 May 2019 09:28:50 -0400
b15ea1
Subject: [PATCH 19/86] Fix dbglog_seek() to update the offset.
b15ea1
b15ea1
Signed-off-by: Peter Jones <pjones@redhat.com>
b15ea1
---
b15ea1
 src/error.c | 8 +++++++-
b15ea1
 1 file changed, 7 insertions(+), 1 deletion(-)
b15ea1
b15ea1
diff --git a/src/error.c b/src/error.c
b15ea1
index 5dc43197c50..5eaee84599a 100644
b15ea1
--- a/src/error.c
b15ea1
+++ b/src/error.c
b15ea1
@@ -194,7 +194,13 @@ static int
b15ea1
 dbglog_seek(void *cookie UNUSED, off64_t *offset, int whence)
b15ea1
 {
b15ea1
 	FILE *log = efi_errlog ? efi_errlog : stderr;
b15ea1
-	return fseek(log, *offset, whence);
b15ea1
+	int rc;
b15ea1
+
b15ea1
+	rc = fseek(log, *offset, whence);
b15ea1
+	if (rc < 0)
b15ea1
+		return rc;
b15ea1
+	*offset = ftell(log);
b15ea1
+	return 0;
b15ea1
 }
b15ea1
 
b15ea1
 static int
b15ea1
-- 
b15ea1
2.24.1
b15ea1