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#4 $
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
67The
68.Fn au_errno_to_bsm
69function accepts a local
70.Xr errno 2
71value, and returns the BSM error number for it.
72This call cannot fail, and instead returns a BSM error number indicating to
73a later decoder that the error could not be encoded.
74.Pp
75The
76.Fn au_strerror
77function converts a BSM error value to a string, generally by converting first to a
78local error number and using the local
79.Xr strerror 3
80function, but will also work for errors that are not locally defined.
81.Sh RETURN VALULES
82On success,
83.Fn au_bsm_to_errno
84returns 0 and a converted error value; on failure, it returns -1 but does not
85set
--- 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#4 $
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
67The
68.Fn au_errno_to_bsm
69function accepts a local
70.Xr errno 2
71value, and returns the BSM error number for it.
72This call cannot fail, and instead returns a BSM error number indicating to
73a later decoder that the error could not be encoded.
74.Pp
75The
76.Fn au_strerror
77function converts a BSM error value to a string, generally by converting first to a
78local error number and using the local
79.Xr strerror 3
80function, but will also work for errors that are not locally defined.
81.Sh RETURN VALULES
82On success,
83.Fn au_bsm_to_errno
84returns 0 and a converted error value; on failure, it returns -1 but does not
85set
--- 27 unchanged lines hidden ---