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.