diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-22 09:55:44 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-22 09:55:44 +0100 |
commit | 2b7fcfdb1365400e634dc4d41a4bcdc1eb29c4d8 (patch) | |
tree | 3a56b34572b29c54edee4bee2538dcdea009c377 | |
parent | d5a53255260e621fa6cbd3b3277aa12b41486e0f (diff) | |
download | prosody-2b7fcfdb1365400e634dc4d41a4bcdc1eb29c4d8.tar.gz prosody-2b7fcfdb1365400e634dc4d41a4bcdc1eb29c4d8.zip |
util.crand: Comment about getrandom
-rw-r--r-- | util-src/crand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util-src/crand.c b/util-src/crand.c index aa3379c2..7dd71a92 100644 --- a/util-src/crand.c +++ b/util-src/crand.c @@ -34,7 +34,10 @@ #error getrandom() requires Linux 3.17 or later #endif -/* Was this not supposed to be a function? */ +/* + * This acts like a read from /dev/urandom with the exception that it + * *does* block if the entropy pool is not yet initialized. + */ int getrandom(void *buf, size_t len, int flags) { return syscall(SYS_getrandom, buf, len, flags); } |