util/nvmutil: check if gbe.bin is seekable

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-14 18:27:34 +00:00
parent 5f6038af5d
commit 3c42608d6d
+3
View File
@@ -999,6 +999,9 @@ xopen(int *fd_ptr, const char *path, int flags, struct stat *st)
if (!S_ISREG(st->st_mode)) if (!S_ISREG(st->st_mode))
err(errno, "%s: not a regular file", path); err(errno, "%s: not a regular file", path);
if (lseek(*fd_ptr, 0, SEEK_CUR) == (off_t)-1)
err(errno, "%s: file not seekable", path);
} }
static void static void