mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: fix possible regression
i went too hard on the sloc reductions a check inside a for loop could cause incomplete reading of gbe images revert that
This commit is contained in:
@@ -164,7 +164,9 @@ readGbeFile(int *fd, const char *path, int flags, size_t nr)
|
||||
else if (errno == ENOTDIR)
|
||||
errno = 0;
|
||||
|
||||
for (int p = 0; (p < 2) && (!skipread[p]); p++) {
|
||||
for (int p = 0; p < 2; p++) {
|
||||
if (skipread[p])
|
||||
continue;
|
||||
if (pread((*fd), (uint8_t *) gbe[p], nr, p << 12) == -1)
|
||||
err(errno, "%s", path);
|
||||
if (big_endian)
|
||||
|
||||
Reference in New Issue
Block a user