public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikos Mavrogiannopoulos <nmav-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: getentropy clarifications
Date: Wed, 29 Mar 2017 14:46:47 +0200	[thread overview]
Message-ID: <1490791607.28079.8.camel@redhat.com> (raw)

[-- 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


             reply	other threads:[~2017-03-29 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 12:46 Nikos Mavrogiannopoulos [this message]
     [not found] ` <1490791607.28079.8.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-31 11:31   ` getentropy clarifications 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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490791607.28079.8.camel@redhat.com \
    --to=nmav-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox