diff options
author | Wes Peters <wes@FreeBSD.org> | 2001-12-06 04:53:31 +0000 |
---|---|---|
committer | Wes Peters <wes@FreeBSD.org> | 2001-12-06 04:53:31 +0000 |
commit | f61a2ede84c391c2bc6212d37885d68cf07d4fe6 (patch) | |
tree | 5e497a3ec40cddc305b92cc007654a2bd8169cbb /lib/libc/string/strerror.3 | |
parent | 5a31fd21e9b3cce9c3106437fe15a417e0161ba5 (diff) |
Notes
Diffstat (limited to 'lib/libc/string/strerror.3')
-rw-r--r-- | lib/libc/string/strerror.3 | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3 index ed63b25f5be7..037b138cad9e 100644 --- a/lib/libc/string/strerror.3 +++ b/lib/libc/string/strerror.3 @@ -81,16 +81,7 @@ function renders the same result into .Fa strerrbuf for a maximum of .Fa buflen -characters and returns 0 upon success. If insufficient -storage is provided in -.Fa strerrbuf -(as specified in -.Fa buflen ) -to contain the error string, -.Er ERANGE -is returned and the string in -.Fa strerrbuf -may not be null-terminated. +characters and returns 0 upon success. .Pp The .Fn perror @@ -114,9 +105,25 @@ otherwise, only the error message string is printed. If .Fa errnum is not a recognized error number, -the error message string will contain +.Fn strerror +returns an error message string containing .Dq Li "Unknown error:\ " -followed by the error number in decimal. +followed by the error number in decimal, while +.Fn strerror_r +returns +.Er EINVAL . +.Pp +If insufficient storage is provided in +.Fa strerrbuf +(as specified in +.Fa buflen ) +to contain the error string, +.Fn strerror_r +returns +.Er ERANGE +and the contents of +.Fa strerrbuf +are indeterminate. .Pp The message strings can be accessed directly using the external array |