summaryrefslogtreecommitdiff
path: root/lib/libc/string/strerror.3
diff options
context:
space:
mode:
authorWes Peters <wes@FreeBSD.org>2001-12-07 06:28:58 +0000
committerWes Peters <wes@FreeBSD.org>2001-12-07 06:28:58 +0000
commit556f162ac01ccf2a3f501c0090aa6011fd723fdd (patch)
tree13ab748ad6a3bd42035b82a51f7ead77dbbf376b /lib/libc/string/strerror.3
parenta28920935a477041c8ff4320fd31f9d09b9e3606 (diff)
Notes
Diffstat (limited to 'lib/libc/string/strerror.3')
-rw-r--r--lib/libc/string/strerror.315
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3
index 037b138cad9e..2ed92d65de97 100644
--- a/lib/libc/string/strerror.3
+++ b/lib/libc/string/strerror.3
@@ -110,8 +110,15 @@ returns an error message string containing
.Dq Li "Unknown error:\ "
followed by the error number in decimal, while
.Fn strerror_r
-returns
+leaves
+.Fa strerrbuf
+unchanged and returns
.Er EINVAL .
+Error numbers recognized by this implementation fall in
+the range 0 <=
+.Fa errnum
+<
+.Fa sys_nerr .
.Pp
If insufficient storage is provided in
.Fa strerrbuf
@@ -121,9 +128,11 @@ to contain the error string,
.Fn strerror_r
returns
.Er ERANGE
-and the contents of
+and
.Fa strerrbuf
-are indeterminate.
+will contain an error message that has been truncated and nul
+terminated to fit the length specified by
+.Fa buflen .
.Pp
The message strings can be accessed directly using the external
array