Home
last modified time | relevance | path

Searched refs:random_fd (Results 1 – 2 of 2) sorted by relevance

/src/sys/contrib/openzfs/lib/libspl/
H A Drandom.c38 static int random_fd = -1, urandom_fd = -1; variable
46 if (random_fd != -1) { in random_init()
51 VERIFY((random_fd = open(RANDOM_PATH, O_RDONLY | O_CLOEXEC)) != -1); in random_init()
58 close(random_fd); in random_fini()
61 random_fd = -1; in random_fini()
94 return (random_get_bytes_common(ptr, len, random_fd)); in random_get_bytes()
/src/contrib/wpa/src/crypto/
H A Drandom.c55 static int random_fd = -1; variable
322 if (random_fd >= 0) { in random_close_fd()
323 eloop_unregister_read_sock(random_fd); in random_close_fd()
324 close(random_fd); in random_close_fd()
325 random_fd = -1; in random_close_fd()
438 if (random_fd >= 0) in random_init()
454 random_fd = open("/dev/random", O_RDONLY | O_NONBLOCK); in random_init()
455 if (random_fd < 0) { in random_init()
463 eloop_register_read_sock(random_fd, random_read_fd, NULL, NULL); in random_init()