util/nvmutil: reset rw_file_exact errno on EINTR

this is essentially what it already did, but it
wasn't explicitly stated. now it's clearer.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-10 14:10:45 +00:00
parent 6eefd80efe
commit 883860d687
+9 -1
View File
@@ -1390,7 +1390,15 @@ rw_file_exact(int fd, uint8_t *mem, size_t len,
if (errno != EINTR)
err(EIO, "%s: %s", path, rw_type_str);
errno = 0;
/*
* EINTR is not fatal, because we
* eventually return. We rely on
* errno for general error state
* after return from rw_file_exact,
* so we don't want a false error.
*/
if (errno == EINTR)
errno = 0;
}
}