From 1c693a942e09b43e513e596d9a8dffef66a8d056 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Nov 2002 17:34:29 +0000 Subject: [PATCH] o Update man page to reflect the new prototypes for mac_{to,from}_text. o Remove a (currently) no-longer-pertinent entry from errors. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Labs --- lib/libc/posix1e/mac_text.3 | 58 ++++++++++--------------------------- 1 file changed, 15 insertions(+), 43 deletions(-) diff --git a/lib/libc/posix1e/mac_text.3 b/lib/libc/posix1e/mac_text.3 index f46e675fc3f1..f33d8c3d368d 100644 --- a/lib/libc/posix1e/mac_text.3 +++ b/lib/libc/posix1e/mac_text.3 @@ -42,67 +42,39 @@ .Lb libc .Sh SYNOPSIS .In sys/mac.h -.Ft mac_t -.Fn mac_from_text "const char *text_p" -.Ft "char *" -.Fn mac_to_text "mac_t label" "size_t *len_p" +.Ft int +.Fn mac_from_text "mac_t *mac" "const char *text" +.Ft int +.Fn mac_to_text "mac_t label" "char **text" .Sh DESCRIPTION The .Fn mac_from_text function converts the text representation of a label -into a -.Vt mac_t , +into the internal policy label format +.Vt ( mac_t ) +and places it in +.Fa *mac , which must later be freed with -.Xr mac_free . +.Xr mac_free 3 . +.Pp The .Fn mac_to_text -function returns -the text representation of -.Fa label -and sets -.Fa *len_p -to the length of the returned string. +function allocates storage for +.Fa *text , +which will be set to the text representation of +.Fa label . .Pp Refer to .Xr maclabel 7 for the MAC label format. .Sh RETURN VALUES -The -.Fn mac_from_text -function returns a valid -.Vt mac_t -equivalent to -the MAC label described in -.Fa text_p -upon success, and -.Dv NULL -upon failure, setting -.Va errno -to indicate the error. -.Pp -The -.Fn mac_to_text -function returns a string -containing the text representation of -.Fa label -upon success, and -.Dv NULL -upon failure, setting -.Va errno -to indicate the error. +.Rv -std mac_from_text mac_to_text .Sh COMPATIBILITY POSIX.1e does not define a text format for text representations of MAC labels. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EINVAL -An invalid policy or qualifier -was specified in -.Fa text_p , -or an invalid MAC label -was specified in -.Fa label . .It Bq Er ENOMEM Insufficient memory was available to allocate internal storage.