public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* getentropy clarifications
@ 2017-03-29 12:46 Nikos Mavrogiannopoulos
       [not found] ` <1490791607.28079.8.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Nikos Mavrogiannopoulos @ 2017-03-29 12:46 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 92 bytes --]

Hi,
 The attached patches clarify some parts of the getentropy() functions.

regards,
Nikos

[-- Attachment #2: 0001-getentropy-corrected-the-header-it-is-defined-under.patch --]
[-- Type: text/x-patch, Size: 1012 bytes --]

From be741e2dde51a060c4294780f5dad83e967955a2 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
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@redhat.com>
---
 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


[-- Attachment #3: 0002-getentropy-clarify-returns.patch --]
[-- Type: text/x-patch, Size: 787 bytes --]

From 112c3653fd293453504bffff35b60785c9f82c40 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
Date: Wed, 29 Mar 2017 14:44:21 +0200
Subject: [PATCH 2/2] getentropy: clarify "returns"

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-10 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-29 12:46 getentropy clarifications Nikos Mavrogiannopoulos
     [not found] ` <1490791607.28079.8.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-31 11:31   ` Florian Weimer
     [not found]     ` <87pogxlm2e.fsf-ZqZwdwZz9NfTBotR3TxKnbNAH6kLmebB@public.gmane.org>
2017-04-10 12:09       ` Michael Kerrisk (man-pages)
2017-04-10 12:06   ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox