io-util: introduce loop_write_full that takes a timeout

Also drop do_poll as the use case is covered
by timeout.
This commit is contained in:
Mike Yuan
2023-09-07 20:30:44 +08:00
parent 82b7bf8c1c
commit e22c60a9d5
34 changed files with 103 additions and 81 deletions
+1 -1
View File
@@ -223,7 +223,7 @@ int random_write_entropy(int fd, const void *seed, size_t size, bool credit) {
if (ioctl(fd, RNDADDENTROPY, info) < 0)
return -errno;
} else {
r = loop_write(fd, seed, size, false);
r = loop_write(fd, seed, size);
if (r < 0)
return r;
}