mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
nvmutil: don't disable blocking on random
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1001,17 +1001,17 @@ rlong(void)
|
||||
|
||||
unsigned long rval;
|
||||
|
||||
fd = open("/dev/urandom", O_RDONLY | O_BINARY | O_NONBLOCK);
|
||||
fd = open("/dev/urandom", O_RDONLY | O_BINARY);
|
||||
|
||||
#if !(defined(__OpenBSD__) && defined(OpenBSD)) || \
|
||||
(defined(__OpenBSD__) && defined(OpenBSD) && \
|
||||
OpenBSD < 604)
|
||||
if (fd < 0) /* old openbsd */
|
||||
fd = open("/dev/arandom", O_RDONLY | O_BINARY | O_NONBLOCK);
|
||||
fd = open("/dev/arandom", O_RDONLY | O_BINARY);
|
||||
#endif
|
||||
|
||||
if (fd < 0)
|
||||
fd = open("/dev/random", O_RDONLY | O_BINARY | O_NONBLOCK);
|
||||
fd = open("/dev/random", O_RDONLY | O_BINARY);
|
||||
|
||||
if (fd < 0)
|
||||
err(errno, "can't open random device");
|
||||
|
||||
Reference in New Issue
Block a user