summaryrefslogtreecommitdiff
path: root/usr/src/man/man3sysevent/sysevent_get_attr_list.3sysevent
blob: 1e3ce99aa31d0bca73b261f48abb4f4692dd48b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\"  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
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SYSEVENT_GET_ATTR_LIST 3SYSEVENT "Jul 24, 2009"
.SH NAME
sysevent_get_attr_list \- get attribute list pointer
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [\fIflag \&.\|.\|.\fR]  \fIfile\fR\&.\|.\|. \fB-lsysevent\fR \fB -lnvpair \fR [\fIlibrary \&.\|.\|.\fR]
#include <libsysevent.h>
#include <libnvpair.h>

\fBint\fR \fBsysevent_get_attr_list\fR(\fBsysevent_t *\fR\fIev\fR, \fBnvlist_t **\fR\fIattr_list\fR);
.fi

.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIev\fR\fR
.ad
.RS 13n
handle to a system event
.RE

.sp
.ne 2
.na
\fB\fIattr_list\fR\fR
.ad
.RS 13n
address of a pointer to attribute list (\fBnvlist_t\fR)
.RE

.SH DESCRIPTION
.sp
.LP
The \fBsysevent_get_attr_list()\fR function updates \fIattr_list\fR to point to
a searchable name-value pair list associated with the \fBsysevent\fR event,
\fIev\fR.  The interface manages the allocation of the attribute list, but it
is up to the caller to free the list when it is no longer needed with a call to
\fBnvlist_free()\fR. See \fBnvlist_alloc\fR(3NVPAIR).
.SH RETURN VALUES
.sp
.LP
The \fBsysevent_get_attr_list()\fR function returns \fB0\fR if the attribute
list for \fIev\fR is found to be valid. Otherwise it returns \fB\(mi1\fR and
sets \fBerrno\fR to indicate the error.
.SH ERRORS
.sp
.LP
The \fBsysevent_get_attr_list()\fR function will fail if:
.sp
.ne 2
.na
\fB\fBENOMEM\fR\fR
.ad
.RS 10n
Insufficient memory available to allocate an \fBnvlist\fR.
.RE

.sp
.ne 2
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
Invalid \fBsysevent\fR event attribute list.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR nvlist_alloc (3NVPAIR),
.BR nvlist_lookup_boolean (3NVPAIR),
.BR attributes (7),
.BR syseventd (8)
.SH NOTES
.sp
.LP
The \fBlibsysevent\fR interfaces do not work at all in non-global zones.