Lines Matching refs:seed_fd
37 _cleanup_close_ int seed_fd = -1, random_fd = -1;
87 seed_fd = open(RANDOM_SEED, O_RDWR|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
89 if (seed_fd < 0) {
92 seed_fd = open(RANDOM_SEED, O_RDONLY|O_CLOEXEC|O_NOCTTY);
93 if (seed_fd < 0) {
116 k = loop_read(seed_fd, buf, buf_size, false);
123 (void) lseek(seed_fd, 0, SEEK_SET);
132 seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
133 if (seed_fd < 0) {
155 (void) fchmod(seed_fd, 0600);
156 (void) fchown(seed_fd, 0, 0);
169 r = loop_write(seed_fd, buf, (size_t) k, false);