6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / man / man3sysevent / sysevent_get_attr_list.3sysevent
blob451e12aa58541f541ff28912f945c87c068424f4
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SYSEVENT_GET_ATTR_LIST 3SYSEVENT "Jul 24, 2009"
7 .SH NAME
8 sysevent_get_attr_list \- get attribute list pointer
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR [\fIflag \&.\|.\|.\fR]  \fIfile\fR\&.\|.\|. \fB-lsysevent\fR \fB -lnvpair \fR [\fIlibrary \&.\|.\|.\fR]
13 #include <libsysevent.h>
14 #include <libnvpair.h>
16 \fBint\fR \fBsysevent_get_attr_list\fR(\fBsysevent_t *\fR\fIev\fR, \fBnvlist_t **\fR\fIattr_list\fR);
17 .fi
19 .SH PARAMETERS
20 .sp
21 .ne 2
22 .na
23 \fB\fIev\fR\fR
24 .ad
25 .RS 13n
26 handle to a system event
27 .RE
29 .sp
30 .ne 2
31 .na
32 \fB\fIattr_list\fR\fR
33 .ad
34 .RS 13n
35 address of a pointer to attribute list (\fBnvlist_t\fR)
36 .RE
38 .SH DESCRIPTION
39 .sp
40 .LP
41 The \fBsysevent_get_attr_list()\fR function updates \fIattr_list\fR to point to
42 a searchable name-value pair list associated with the \fBsysevent\fR event,
43 \fIev\fR.  The interface manages the allocation of the attribute list, but it
44 is up to the caller to free the list when it is no longer needed with a call to
45 \fBnvlist_free()\fR. See \fBnvlist_alloc\fR(3NVPAIR).
46 .SH RETURN VALUES
47 .sp
48 .LP
49 The \fBsysevent_get_attr_list()\fR function returns \fB0\fR if the attribute
50 list for \fIev\fR is found to be valid. Otherwise it returns \fB\(mi1\fR and
51 sets \fBerrno\fR to indicate the error.
52 .SH ERRORS
53 .sp
54 .LP
55 The \fBsysevent_get_attr_list()\fR function will fail if:
56 .sp
57 .ne 2
58 .na
59 \fB\fBENOMEM\fR\fR
60 .ad
61 .RS 10n
62 Insufficient memory available to allocate an \fBnvlist\fR.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBEINVAL\fR\fR
69 .ad
70 .RS 10n
71 Invalid \fBsysevent\fR event attribute list.
72 .RE
74 .SH ATTRIBUTES
75 .sp
76 .LP
77 See \fBattributes\fR(5) for descriptions of the following attributes:
78 .sp
80 .sp
81 .TS
82 box;
83 c | c
84 l | l .
85 ATTRIBUTE TYPE  ATTRIBUTE VALUE
87 Interface Stability     Committed
89 MT-Level        MT-Safe
90 .TE
92 .SH SEE ALSO
93 .sp
94 .LP
95 \fBsyseventd\fR(1M), \fBnvlist_alloc\fR(3NVPAIR),
96 \fBnvlist_lookup_boolean\fR(3NVPAIR), \fBattributes\fR(5)
97 .SH NOTES
98 .sp
99 .LP
100 The \fBlibsysevent\fR interfaces do not work at all in non-global zones.