Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171531417
D40685.id123972.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40685.id123972.diff
View Options
diff --git a/lib/libutil/login_cap.3 b/lib/libutil/login_cap.3
--- a/lib/libutil/login_cap.3
+++ b/lib/libutil/login_cap.3
@@ -27,6 +27,7 @@
.Nm login_getcapbool ,
.Nm login_getcaplist ,
.Nm login_getcapnum ,
+.Nm login_getcapenum ,
.Nm login_getcapstr ,
.Nm login_getcapsize ,
.Nm login_getcaptime ,
@@ -62,6 +63,8 @@
.Fn login_getcaptime "login_cap_t *lc" "const char *cap" "rlim_t def" "rlim_t error"
.Ft rlim_t
.Fn login_getcapnum "login_cap_t *lc" "const char *cap" "rlim_t def" "rlim_t error"
+.Ft int
+.Fn login_getcapenum "login_cap_t *lc" "const char *cap" "const char * const *values"
.Ft rlim_t
.Fn login_getcapsize "login_cap_t *lc" "const char *cap" "rlim_t def" "rlim_t error"
.Ft int
@@ -461,6 +464,22 @@
parameter is returned, and if an error occurs, the
.Fa error
parameter is returned.
+.It Fn login_getcapenum
+This function returns whether the searched capability is a string with value
+among a predefined set passed in argument
+.Fa values
+as a NULL-terminated array of strings.
+A non-negative value indicates a match and is the index of the capability's
+value in array
+.Fa values .
+Value -4 is returned if
+.Fa lc
+or
+.Fa cap
+are insufficiently initialized or invalid, -3 on allocation failure (out of
+memory), -2 if the capability isn't specified or its value is not a string or -1
+if it is specified and a string but its value is not among
+.Fa values .
.It Fn login_getcapsize
.Fn login_getcapsize
returns a value representing a size (typically, file or memory)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 12, 3:14 PM (38 m, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38799641
Default Alt Text
D40685.id123972.diff (1 KB)
Attached To
Mode
D40685: login_cap(3): Document login_getcapenum()
Attached
Detach File
Event Timeline
Log In to Comment