random-seed: move pool size determination to random-util.[ch]

That way we can reuse it elsewhere.
This commit is contained in:
Lennart Poettering
2019-07-25 18:16:46 +02:00
parent c18ecf0375
commit 3e155eba43
3 changed files with 35 additions and 18 deletions
+6
View File
@@ -31,3 +31,9 @@ static inline uint32_t random_u32(void) {
}
int rdrand(unsigned long *ret);
/* Some limits on the pool sizes when we deal with the kernel random pool */
#define RANDOM_POOL_SIZE_MIN 512U
#define RANDOM_POOL_SIZE_MAX (10U*1024U*1024U)
size_t random_pool_size(void);