# HG changeset patch # User Kim Alvefur # Date 1485075344 -3600 # Node ID 201d0df6cce96c62ffb80bb41249468cae79f463 # Parent b9910a507250e5af81a2948e99c94402af1e042b util.crand: Comment about getrandom diff -r b9910a507250 -r 201d0df6cce9 util-src/crand.c --- a/util-src/crand.c Sun Jan 22 09:32:33 2017 +0100 +++ b/util-src/crand.c Sun Jan 22 09:55:44 2017 +0100 @@ -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); }