mirror of https://github.com/mkerrisk/man-pages
getrandom.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
dcd72baa13
commit
01a6407427
|
@ -47,7 +47,7 @@ environmental noise.
|
|||
Unnecessarily reading large quantities of data will have a negative impact
|
||||
on other users of the
|
||||
.I /dev/random
|
||||
and the
|
||||
and
|
||||
.I /dev/urandom
|
||||
devices.
|
||||
Therefore
|
||||
|
@ -70,7 +70,7 @@ The
|
|||
.I /dev/random
|
||||
pool is limited based on the entropy that can be obtained from environmental
|
||||
noise.
|
||||
If less random bytes are available than are requested in argument
|
||||
If fewer random bytes are available than are requested in
|
||||
.IR buflen ,
|
||||
the available random bytes will be copied and the call returns.
|
||||
If no random byte is available, the response will depend on the
|
||||
|
@ -97,7 +97,7 @@ On success,
|
|||
.BR getrandom ()
|
||||
returns the number of bytes that were copied to the buffer
|
||||
.IR buf .
|
||||
This may be less than the bytes requested by the caller via
|
||||
This may be less than the number of bytes requested via
|
||||
.I buflen
|
||||
if insufficient entropy was present in the
|
||||
.IR /dev/random
|
||||
|
@ -109,11 +109,11 @@ is set appropriately.
|
|||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
An invalid flag was passed to
|
||||
.BR getrandom ().
|
||||
An invalid flag was specified in
|
||||
.IR flags .
|
||||
.TP
|
||||
.B EFAULT
|
||||
The address referenced in parameter
|
||||
The address referred to by
|
||||
.I buf
|
||||
is outside the accessible address space.
|
||||
.TP
|
||||
|
@ -151,13 +151,11 @@ depends on the initialization state of the entropy buffer
|
|||
and on the request size
|
||||
.IR buflen .
|
||||
If the entropy is not yet initialized or the request size is large
|
||||
.RI ( buflen
|
||||
> 256),
|
||||
.RI ( buflen "\ >\ 256),"
|
||||
.B EINTR
|
||||
will be returned.
|
||||
If the entropy pool has been intialized and the request size is small
|
||||
.RI ( buflen
|
||||
<= 256),
|
||||
If the entropy pool has been initialized and the request size is small
|
||||
.RI ( buflen "\ <=\ 256),"
|
||||
.BR getrandom ()
|
||||
will not return
|
||||
.BR EINTR .
|
||||
|
@ -175,7 +173,7 @@ Calling
|
|||
.BR getrandom ()
|
||||
to read
|
||||
.I /dev/urandom
|
||||
for small values (<= 256) of
|
||||
for small values (<=\ 256) of
|
||||
.I buflen
|
||||
is the preferred mode of usage.
|
||||
.PP
|
||||
|
@ -189,8 +187,9 @@ system call.
|
|||
The user of
|
||||
.BR getrandom ()
|
||||
.I must
|
||||
always check the return value, in case it indicates some error,
|
||||
or if fewer bytes than requested were returned.
|
||||
always check the return value,
|
||||
to determine whether either an error occurred
|
||||
or fewer bytes than requested were returned.
|
||||
In the case where
|
||||
.B GRND_RANDOM
|
||||
is not specified and
|
||||
|
|
Loading…
Reference in New Issue