mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +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;
|
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)) || \
|
#if !(defined(__OpenBSD__) && defined(OpenBSD)) || \
|
||||||
(defined(__OpenBSD__) && defined(OpenBSD) && \
|
(defined(__OpenBSD__) && defined(OpenBSD) && \
|
||||||
OpenBSD < 604)
|
OpenBSD < 604)
|
||||||
if (fd < 0) /* old openbsd */
|
if (fd < 0) /* old openbsd */
|
||||||
fd = open("/dev/arandom", O_RDONLY | O_BINARY | O_NONBLOCK);
|
fd = open("/dev/arandom", O_RDONLY | O_BINARY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
fd = open("/dev/random", O_RDONLY | O_BINARY | O_NONBLOCK);
|
fd = open("/dev/random", O_RDONLY | O_BINARY);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
err(errno, "can't open random device");
|
err(errno, "can't open random device");
|
||||||
|
|||||||
Reference in New Issue
Block a user