NAME | SYNOPSIS | API RESTRICTIONS | PARAMETERS | DESCRIPTION | RETURN VALUE | ATTRIBUTES
$(OS_DIR)/lib/libsysevent.a #include <sys/sysevent.h> #include <libsysevent.h>int sysevent_lookup_attr(sysevent_t *ev, char *name, int datatype, sysevent_value_t *ev_attr_val);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
Handle pointing to an event.
Name of attribute to lookup
Type of attribute to lookup
Pointer to event attribute value
The sysevent_lookup_attr() function searches the attribute list associated with event ev for the attribute named name and of type datatype. Structure members of ev_attr_val are updated to reflect the datatype and appropriate data value for the attribute.
Any buffer data contained in ev_attr_val is managed by the library and can only be freed by sysevent_free() at the time that the event buffer is deallocated.
Also note that sysevent_lookup_attr() works only on an event duplicate obtained via a call to sysevent_dup(). This allows the attributes associated with the system event to be unpacked. If sysevent_dup() is not called prior to sysevent_lookup_attr() invocation, -1 is returned and errno is set to ENOENT.
The event duplicate must be explicitly freed by calling sysevent_free() when it is no longer in use.
On success, 0 is returned. If no match occurs, ENOENT is returned and ev_attr_val is not updated.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | PARAMETERS | DESCRIPTION | RETURN VALUE | ATTRIBUTES