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]
cc [flag .\|.\|.] file.\|.\|. -lsysevent -lnvpair [library .\|.\|.] #include <libsysevent.h> #include <libnvpair.h> int sysevent_get_attr_list(sysevent_t *ev, nvlist_t **attr_list);
handle to a system event
address of a pointer to attribute list (nvlist_t)
The sysevent_get_attr_list() function updates attr_list to point to a searchable name-value pair list associated with the sysevent event, ev. 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 nvlist_free(). See nvlist_alloc(3NVPAIR).
The sysevent_get_attr_list() function returns 0 if the attribute list for ev is found to be valid. Otherwise it returns -1 and sets errno to indicate the error.
The sysevent_get_attr_list() function will fail if: ENOMEM
Insufficient memory available to allocate an nvlist.
Invalid sysevent event attribute list.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
MT-Level MT-Safe |
syseventd(1M), nvlist_alloc(3NVPAIR), nvlist_lookup_boolean(3NVPAIR), attributes(5)
The libsysevent interfaces do not work at all in non-global zones.