util/nvmutil: properly use rc in rw_File_exact

subtract and add iteratively

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-10 16:57:46 +00:00
parent 9eb3895f4e
commit 48f65abb01

View File

@@ -1408,7 +1408,7 @@ rw_file_exact(int fd, uint8_t *mem, size_t len,
}
while (rc < len) {
rval = do_rw(fd, mem, len, off, rw_type);
rval = do_rw(fd, mem + rc, len - rc, off + rc, rw_type);
if (rval < 0 && errno == EINTR) {
continue;