mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-26 11:32:01 -05:00
own CVS tree will help minimize CVS conflicts. Maybe not. Blame Graff for getting me to trim all trailing whitespace.
95 lines
2.4 KiB
Groff
95 lines
2.4 KiB
Groff
.\" Copyright (C) 2000 Internet Software Consortium.
|
|
.\"
|
|
.\" Permission to use, copy, modify, and distribute this software for any
|
|
.\" purpose with or without fee is hereby granted, provided that the above
|
|
.\" copyright notice and this permission notice appear in all copies.
|
|
.\"
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
|
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
|
.\" INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
|
.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
|
.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
.\"
|
|
.\" $Id: isc_error.3,v 1.3 2000/08/01 01:19:11 tale Exp $
|
|
.\"
|
|
.Dd Jun 30, 2000
|
|
.Dt error 3
|
|
.Os BIND9 9
|
|
.ds vT BIND9 Programmer's Manual
|
|
.Sh NAME
|
|
.Nm isc__errno2result
|
|
.Nd map POSIX error codes to BIND9 error codes
|
|
.Sh SYNOPSIS
|
|
.Fd #include <config.h>
|
|
|
|
.Fd #include <errno.h>
|
|
|
|
.Fd #include <isc/result.h>
|
|
|
|
.Fd #include "errno2result.h"
|
|
.Ft isc_result_t
|
|
.Fo isc__errno2result
|
|
.Fa "int posixerrno"
|
|
.Fc
|
|
.Sh DESCRIPTION
|
|
.Fn isc__errno2result
|
|
maps the POSIX error code
|
|
.Fa posixerrno
|
|
to its equivalent BIND9 error code.
|
|
This function is internal to BIND9.
|
|
It is not intended to be called by applications using the BIND9 library.
|
|
The function is documented here to indicate how POSIX error codes
|
|
are mapped to their ISC equivalents.
|
|
.Pp
|
|
.Sh RETURN VALUES
|
|
When
|
|
.Fa posixerrno
|
|
is set to the POSIX error codes
|
|
.Er ENOTDIR ,
|
|
.Er ELOOP ,
|
|
.Er EINVAL ,
|
|
.Er ENAMETOOLONG ,
|
|
and
|
|
.Er EBADF ,
|
|
.Fn isc__errno2result
|
|
returns
|
|
.Er ISC_R_INVALIDFILE .
|
|
.Er ISC_R_FILENOTFOUND
|
|
is returned when
|
|
.Fa posixerrno
|
|
is set to
|
|
.Er ENOENT .
|
|
A retun value of
|
|
.Er ISC_R_NOPERM
|
|
is produced when the POSIX error code is
|
|
.Er EACCES .
|
|
If
|
|
.Fa posixerrno
|
|
is set to
|
|
.Er EIO
|
|
.Fn isc__errno2result
|
|
returns
|
|
.Er ISC_R_IOERROR
|
|
and if the error code is
|
|
.Er ENOMEM ,
|
|
.Er ISC_R_NOMEMORY
|
|
is returned.
|
|
For all other values of
|
|
.Fa posixerrno ,
|
|
.Fn isc__errno2result
|
|
returns
|
|
.Er ISC_R_UNEXPECTED .
|
|
.Sh SEE ALSO
|
|
.Xr errno 2 ,
|
|
.Xr perror 3
|
|
.Sh BUGS
|
|
Returning
|
|
.Er ISC_R_UNEXPECTED
|
|
for so many error codes is a little unhelpful.
|
|
It would be nice if
|
|
.Fn isc__errno2result
|
|
produced something more descriptive like the system's error string for
|
|
these error codes.
|