1.\"-
2.\" Copyright (c) 2008 Apple Inc.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
--- 12 unchanged lines hidden (view full) ---
21.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27.\" POSSIBILITY OF SUCH DAMAGE.
28.\"
29.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_errno.3#3 $
30.\"
31.Dd December 8, 2008
32.Dt AU_BSM_TO_ERRNO 3
33.Os
34.Sh NAME
35.Nm au_bsm_to_errno ,
36.Nm au_errno_to_bsm ,
37.Nm au_strerror
--- 21 unchanged lines hidden (view full) ---
59.Xr errno 2
60that will be stored in the integer pointed to by
61.Fa errorp
62if successful.
63This call will fail if the BSM error cannot be mapped into a local error
64number, which may occur if the return token was generated on another
65operating system.
66.Pp
67.Fn au_errno_to_bsm
68function accepts a local
69.Xr errno 2
70value, and returns the BSM error number for it.
71This call cannot fail, and instead returns a BSM error number indicating to
72a later decoder that the error could not be encoded.
73.Pp
74The
75.Fn au_strerror
76converts a BSM error value to a string, generally by converting first to a
77local error number and using the local
78.Xr strerror 3
79function, but will also work for errors that are not locally defined.
80.Sh RETURN VALULES
81On success,
82.Fn au_bsm_to_errno
83returns 0 and a converted error value; on failure, it returns -1 but does not
84set
--- 27 unchanged lines hidden ---
2.\" Copyright (c) 2008 Apple Inc.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
--- 12 unchanged lines hidden (view full) ---
21.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27.\" POSSIBILITY OF SUCH DAMAGE.
28.\"
29.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_errno.3#3 $
30.\"
31.Dd December 8, 2008
32.Dt AU_BSM_TO_ERRNO 3
33.Os
34.Sh NAME
35.Nm au_bsm_to_errno ,
36.Nm au_errno_to_bsm ,
37.Nm au_strerror
--- 21 unchanged lines hidden (view full) ---
59.Xr errno 2
60that will be stored in the integer pointed to by
61.Fa errorp
62if successful.
63This call will fail if the BSM error cannot be mapped into a local error
64number, which may occur if the return token was generated on another
65operating system.
66.Pp
67.Fn au_errno_to_bsm
68function accepts a local
69.Xr errno 2
70value, and returns the BSM error number for it.
71This call cannot fail, and instead returns a BSM error number indicating to
72a later decoder that the error could not be encoded.
73.Pp
74The
75.Fn au_strerror
76converts a BSM error value to a string, generally by converting first to a
77local error number and using the local
78.Xr strerror 3
79function, but will also work for errors that are not locally defined.
80.Sh RETURN VALULES
81On success,
82.Fn au_bsm_to_errno
83returns 0 and a converted error value; on failure, it returns -1 but does not
84set
--- 27 unchanged lines hidden ---