git: 3cb6c6c9eeb3 - main - libcapsicum: document return values

From: Mariusz Zaborski <oshogbo_at_FreeBSD.org>
Date: Thu, 16 May 2024 18:28:08 UTC
The branch main has been updated by oshogbo:

URL: https://cgit.FreeBSD.org/src/commit/?id=3cb6c6c9eeb36e0a29986fd518f5ccc567e9eb85

commit 3cb6c6c9eeb36e0a29986fd518f5ccc567e9eb85
Author:     Mariusz Zaborski <oshogbo@FreeBSD.org>
AuthorDate: 2024-05-16 18:27:25 +0000
Commit:     Mariusz Zaborski <oshogbo@FreeBSD.org>
CommitDate: 2024-05-16 18:29:18 +0000

    libcapsicum: document return values
    
    Reviewed by:    emaste
    Requested by:   des
    Differential Revision:  https://reviews.freebsd.org/D45222
---
 lib/libcapsicum/capsicum_helpers.3 | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/lib/libcapsicum/capsicum_helpers.3 b/lib/libcapsicum/capsicum_helpers.3
index 9c4c0bfa0229..38dd329ef2f3 100644
--- a/lib/libcapsicum/capsicum_helpers.3
+++ b/lib/libcapsicum/capsicum_helpers.3
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 2, 2020
+.Dd May 16, 2024
 .Dt CAPSICUM_HELPERS 3
 .Os
 .Sh NAME
@@ -150,6 +150,31 @@ NLS data is used for localized error printing by
 and
 .Xr err 3 ,
 among others.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn caph_enter ,
+.Fn caph_enter_casper ,
+.Fn caph_rights_limit ,
+.Fn caph_ioctls_limit ,
+.Fn caph_fcntls_limit ,
+.Fn caph_limit_stream ,
+.Fn caph_limit_stdin ,
+.Fn caph_limit_stderr ,
+.Fn caph_limit_stdout ,
+and
+.Fn caph_limit_stdio
+return a value
+of 0.
+Otherwise, a value of -1 is returned and the global variable
+.Va errno
+is set to indicate the error.
+.Pp
+Functions
+.Fn caph_stream_rights ,
+.Fn caph_cache_tzdata ,
+and
+.Fn caph_cache_catpages
+can not fail.
 .Ed
 .Sh SEE ALSO
 .Xr cap_enter 2 ,