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