mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: check if gbe.bin is seekable
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user