Hi, The attached patches clarify some parts of the getentropy() functions. regards, Nikos
From be741e2dde51a060c4294780f5dad83e967955a2 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> Date: Wed, 29 Mar 2017 14:43:14 +0200 Subject: [PATCH 1/2] getentropy: corrected the header it is defined under Signed-off-by: Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> --- man3/getentropy.3 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/man3/getentropy.3 b/man3/getentropy.3 index 697f937..4cd4d61 100644 --- a/man3/getentropy.3 +++ b/man3/getentropy.3 @@ -26,7 +26,7 @@ .SH NAME getentropy \- fill a buffer with random bytes .SH SYNOPSIS -.B #include <sys/random.h> +.B #include <unistd.h> .sp .BI "int getentropy(void *" buffer ", size_t " length ); .SH DESCRIPTION @@ -90,6 +90,10 @@ a cancellation point, .BR getentropy () is not a cancellation point. +In earlier versions of glibc this function was avaible under the +.BR <sys/random.h> +header. + A call to .BR getentropy () may block if the system has just booted and the kernel has -- 2.9.3
From 112c3653fd293453504bffff35b60785c9f82c40 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> Date: Wed, 29 Mar 2017 14:44:21 +0200 Subject: [PATCH 2/2] getentropy: clarify "returns" Signed-off-by: Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx> --- man3/getentropy.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/getentropy.3 b/man3/getentropy.3 index 4cd4d61..b341284 100644 --- a/man3/getentropy.3 +++ b/man3/getentropy.3 @@ -43,7 +43,7 @@ argument is 256. A successful call to .BR getentropy () -always returns the requested number of bytes of entropy. +always returns zero and provides the requested number of bytes of entropy. .SH RETURN VALUE On success, this function returns zero, On error, \-1 is returned, and -- 2.9.3