xref: /illumos-gate/usr/src/man/man3proc/proc_fltset2str.3proc (revision be4e997e05c92f444c81d2d197b79e67ebee2786)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 11, 2016
15.Dt PROC_FLTSET2STR 3PROC
16.Os
17.Sh NAME
18.Nm proc_fltset2str ,
19.Nm proc_sigset2str ,
20.Nm proc_sysset2str
21.Nd convert a fault, signal, or system call set to a string
22.Sh SYNOPSIS
23.Lb libproc
24.In libproc.h
25.Ft "char *"
26.Fo proc_fltset2str
27.Fa "const fltset_t *set"
28.Fa "const char *delim"
29.Fa "int members"
30.Fa "char *buf"
31.Fa "size_t buflen"
32.Fc
33.Ft "char *"
34.Fo proc_sigset2str
35.Fa "const sigset_t *set"
36.Fa "const char *delim"
37.Fa "int members"
38.Fa "char *buf"
39.Fa "size_t buflen"
40.Fc
41.Ft "char *"
42.Fo proc_sysset2str
43.Fa "const sysset_t *set"
44.Fa "const char *delim"
45.Fa "int members"
46.Fa "char *buf"
47.Fa "size_t buflen"
48.Fc
49.Sh DESCRIPTION
50The
51.Fn proc_fltset2str ,
52.Fn proc_sigset2str ,
53and
54.Fn proc_sysset2str
55functions respectively convert the fault, signal, and system call sets in
56.Fa fltset ,
57.Fa sigset ,
58and
59.Fa sysset
60to a human-readable name and place the corresponding string in
61.Fa buf .
62.Pp
63Up to
64.Fa buflen
65characters will be placed in
66.Fa buf ,
67including the null terminator. If
68.Fa buf
69is not large enough to hold the entire string, then an error
70will be returned.
71.Pp
72The
73.Fa members
74argument controls which members of the set are written out. If
75.Fa members
76is
77.Sy 1 ,
78then the sets member are placed in
79.Fa buf .
80If
81.Fa members
82is
83.Sy 0 ,
84then the members which are not in the set are placed in
85.Fa buf .
86.Pp
87The string
88.Fa delim
89will be placed in-between every member of the set. It will not come after
90the last entry in the set.
91.Sh RETURN VALUES
92Upon successful completion, the
93.Fn proc_fltset2str ,
94.Fn proc_sigset2str ,
95and
96.Fn proc_sysset2str
97functions return
98.Fa buf .
99Otherwise,
100.Dv NULL
101is returned.
102.Sh INTERFACE STABILITY
103.Sy Uncommitted
104.Sh MT-LEVEL
105.Sy MT-Safe
106.Sh SEE ALSO
107.Xr libproc 3LIB ,
108.Xr proc_fltname 3PROC ,
109.Xr proc_signame 3PROC ,
110.Xr proc_str2flt 3PROC ,
111.Xr proc_str2fltset 3PROC ,
112.Xr proc_str2sig 3PROC ,
113.Xr proc_str2sigset 3PROC ,
114.Xr proc_str2sys 3PROC ,
115.Xr proc_str2sysset 3PROC ,
116.Xr proc_sysname 3PROC ,
117.Xr proc 4
118