Go to main content

man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: Thursday, June 13, 2019
 
 

sysevent_get_attr_list(3SYSEVENT)

Name

sysevent_get_attr_list - get attribute list pointer

Synopsis

cc [flag …]  file–lsysevent –lnvpair [library …] 
#include <libsysevent.h>
#include <libnvpair.h>

int sysevent_get_attr_list(sysevent_t *ev, nvlist_t **attr_list);

Parameters

ev

handle to a system event

attr_list

address of a pointer to attribute list (nvlist_t)

Description

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).

Return Values

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.

Errors

The sysevent_get_attr_list() function will fail if:

ENOMEM

Insufficient memory available to allocate an nvlist.

EINVAL

Invalid sysevent event attribute list.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe

See Also

nvlist_alloc(3NVPAIR), nvlist_lookup_boolean(3NVPAIR), attributes(7), syseventd(8)

Notes

The libsysevent interfaces do not work at all in non-global zones.