mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
@@ -1390,7 +1390,15 @@ rw_file_exact(int fd, uint8_t *mem, size_t len,
|
|||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
err(EIO, "%s: %s", path, rw_type_str);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user