diff options
author | keramida <keramida@FreeBSD.org> | 2004-10-12 14:52:52 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2004-10-12 14:52:52 +0000 |
commit | c857f72425e9b432db8b45fcab4e6303998e57db (patch) | |
tree | 9c6128e736fcd0bcd1f58670097142984d83f9b5 /lib/libc/string | |
parent | ae55fb3a153b8180ee7948a8c530a0dc65b6cb89 (diff) | |
download | FreeBSD-src-c857f72425e9b432db8b45fcab4e6303998e57db.zip FreeBSD-src-c857f72425e9b432db8b45fcab4e6303998e57db.tar.gz |
Correctly document the return value of strerror() and strerror_r() and
the contents of the returned buffer for unknown error codes.
PR: docs/72578
Submitted by: Jilles Tjoelker <jilles@stack.nl>
MFC after: 3 days
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/strerror.3 | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3 index c8c9a20..9f486ed 100644 --- a/lib/libc/string/strerror.3 +++ b/lib/libc/string/strerror.3 @@ -36,7 +36,7 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 19, 2002 +.Dd October 12, 2004 .Dt STRERROR 3 .Os .Sh NAME @@ -102,18 +102,17 @@ a colon and space .Pq Dq Li ":\ " ; otherwise, only the error message string is printed. .Pp -If -.Fa errnum -is not a recognized error number, -.Fn strerror -returns an error message string containing +If the error number is not recognized, these functions return an error message +string containing .Dq Li "Unknown error:\ " -followed by the error number in decimal, while +followed by the error number in decimal. +The +.Fn strerror +and .Fn strerror_r -leaves -.Fa strerrbuf -unchanged and returns -.Er EINVAL . +functions return +.Er EINVAL +as a warning. Error numbers recognized by this implementation fall in the range 0 < .Fa errnum |