diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-08-08 23:14:52 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-08-08 23:14:52 +0000 |
commit | 62ea819e7aa0b78ad7875017b16636dfd8b93b11 (patch) | |
tree | 1a5c95ab720e752eea7b7737f43d405b126cbbc3 /lib/libc | |
parent | 1dd63a139a62d2e3f73a0c504617201c5543cf9b (diff) |
Clarify a bit.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/err.3 | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3 index 508e7edbc85..9867ddb2cc9 100644 --- a/lib/libc/gen/err.3 +++ b/lib/libc/gen/err.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: err.3,v 1.3 1997/05/30 07:48:23 deraadt Exp $ +.\" $OpenBSD: err.3,v 1.4 1997/08/08 23:14:51 millert Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June, 9, 1993 +.Dd August, 8, 1997 .Dt ERR 3 .Os BSD 4 .Sh NAME @@ -74,14 +74,19 @@ and a space are output. If the .Va fmt argument is not NULL, the formatted error message, a colon character, -and a space are output. +and a space are output. The +.Va fmt +argument (and associated arguments) may be any format allowed by +.Xr printf 3 +or a simple string. +.Pp In the case of the .Fn err , .Fn verr , .Fn warn , and .Fn vwarn -functions, the error message string affiliated with the current value of +functions only, the error message string affiliated with the current value of the global variable .Va errno is output. @@ -96,12 +101,14 @@ and functions do not return, but exit with the value of the argument .Fa eval . .Sh EXAMPLES -Display the current errno information string and exit: +Display the current +.Va errno +information string and exit: .Bd -literal -offset indent if ((p = malloc(size)) == NULL) err(1, NULL); if ((fd = open(file_name, O_RDONLY, 0)) == -1) - err(1, "%s", file_name); + err(1, file_name); .Ed .Pp Display an error message and exit: @@ -119,6 +126,9 @@ if ((fd = open(block_device, O_RDONLY, 0)) == -1) err(1, "%s", block_device); .Ed .Sh SEE ALSO +.Xr exit 3 , +.Xr perror 3 , +.Xr printf 3 , .Xr strerror 3 .Sh HISTORY The |