Lines Matching defs:fd_random
144 int fd_random;
150 if ((fd_random = open(_PATH_URANDOM, O_RDONLY)) == -1) {
156 if (ioctl(fd_random, RNDGETENTCNT, &systementropy) == -1) {
162 if ((size_t)(nread = read(fd_random, buf, sizeof buf)) != sizeof buf) {
171 if (close(fd_random) == -1)
173 fd_random = -1; /* paranoia */
279 int fd_new, fd_old, fd_random;
388 if ((fd_random = open(_PATH_URANDOM, O_WRONLY)) == -1)
390 if (ioctl(fd_random, RNDADDDATA, &rd) == -1)
393 if (close(fd_random) == -1)
395 fd_random = -1; /* paranoia */