From ac04a5f50abdbf241d14bce845051051eb80b137 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 29 Mar 2026 14:15:34 +0100 Subject: libreboot-utils/lib: loop eintr on [p]read/[p]write i forgot to do this! with this, I/O should be bullet proof now. i already loop this on other I/O commands. Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/rand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/libreboot-utils/lib/rand.c') diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c index 2aa0de3a..9da8d9eb 100644 --- a/util/libreboot-utils/lib/rand.c +++ b/util/libreboot-utils/lib/rand.c @@ -150,7 +150,8 @@ rset(void *buf, size_t n) int fd = -1; open_on_eintr("/dev/urandom", &fd, O_RDONLY, 0400, NULL); retry_rand: - if ((rc = read(fd, (unsigned char *)buf + off, n - off)) < 0) { + if ((rc = read_on_eintr(fd, + (unsigned char *)buf + off, n - off)) < 0) { #elif defined(__linux__) retry_rand: if ((rc = (ssize_t)syscall(SYS_getrandom, -- cgit v1.2.1