diff options
-rw-r--r-- | lib/libc/gen/strtofflags.3 | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/libc/gen/strtofflags.3 b/lib/libc/gen/strtofflags.3 index c421d5c95d9..ec6cf62f85d 100644 --- a/lib/libc/gen/strtofflags.3 +++ b/lib/libc/gen/strtofflags.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strtofflags.3,v 1.1 2000/07/19 19:26:04 mickey Exp $ +.\" $OpenBSD: strtofflags.3,v 1.2 2000/07/19 20:37:40 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -41,8 +41,6 @@ .Nm fflagstostr , .Nm strtofflags .Nd convert between file flag bits and their string names -.Sh LIBRARY -.Lb libc .Sh SYNOPSIS .Fd #include <unistd.h> .Ft char * @@ -59,24 +57,27 @@ If no flags are set a zero length string is returned. If memory cannot be allocated for the return value, .Fn fflagstostr returns -.Dv NULL . +.Dv NULL . .Pp -The value returned from +The value returned from .Fn fflagstostr -is obtained from -.Fn malloc +is obtained from +.Fn malloc and should be returned to the system with -.Fn free +.Fn free when the program is done with it. .Pp The .Fn strtofflags function takes a string of file flags, as described in .Xr chflags 1 , -parses it, and returns the 'set' flags and 'clear' flags -such as would be given as arguments to +parses it, and returns the +.Dq set +and +.Dq clear +flags such as would be given as arguments to .Xr chflags 2 . -On success +On success, .Fn strtofflags returns 0, otherwise it returns non-zero and .Fa stringp @@ -85,8 +86,9 @@ is left pointing to the offending token. The .Fn fflagstostr function -may fail and set errno for any of the errors specified for the library -routine +may fail and set +.Va errno +for any of the errors specified for the library routine .Xr malloc 3 . .Sh SEE ALSO .Xr chflags 1 , @@ -98,4 +100,4 @@ The and .Fn strtofflags functions first appeared in -.Fx 4.0 . +.Ox 2.8 . |