'\" 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 #include \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(5) 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 \fBsyseventd\fR(1M), \fBnvlist_alloc\fR(3NVPAIR), \fBnvlist_lookup_boolean\fR(3NVPAIR), \fBattributes\fR(5) .SH NOTES .sp .LP The \fBlibsysevent\fR interfaces do not work at all in non-global zones.