mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-01 04:50:50 -05:00
89 lines
2.2 KiB
Groff
89 lines
2.2 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: error.man,v 1.2 2000/06/22 00:52:09 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
|
|
.Fn isc__errno2result "int posixerrno"
|
|
.Sh DESCRIPTION
|
|
.Fn isc__errno2result
|
|
maps the POSIX error code
|
|
.Fa posixerrno
|
|
to its equivalent BIND9 error code.
|
|
.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.
|