ldi_prop_exists - Check for the existence of a property
#include <sys/sunldi.h> int ldi_prop_exists(ldi_handle_t lh, uint_t flags, char *name);
Solaris DDI specific (Solaris DDI)
lh
flags
LDI_DEV_T_ANY
DDI_PROP_DONTPASS
DDI_PROP_NOTPROM
name
ldi_prop_exists() checks for the existence of a property associated with a device represented by the layered driver handle, regardless of the property value data type.
Properties are searched for based on the dip and dev_t values associated with the layered handle, and the property name. This association is handled by the layered driver infrastructure on behalf of the consumers of ldi_prop_exists().
The property search order is as follows:
Typically, the specific dev_t value associated with the device represented by the layered handle (ldi_handle_t) is used as a part of the property match criteria. This association is handled by the layered driver infrastructure on behalf of the consumers of the ldi property look up functions.
However, if the LDI_DEV_T_ANY flag is used, the ldi property lookup functions will match the request regardless of the dev_t value associated with the property at the time of its creation. If a property was created with a dev_t set to DDI_DEV_T_NONE, the only way to look up this property is with the LDI_DEV_T_ANY flag. PROM properties are always created with a dev_t set to DDI_DEV_T_NONE.
name must always be set to the name of the property being looked up.
ldi_prop_exists() returns 1 if the property exists and 0 otherwise.
This function may be called from user or kernel context.
The following example demonstrates the use of ldi_prop_exists(). /* Determine the existence of the "interrupts" property */ ldi_prop_exists(lh, LDI_DEV_T_ANY|DDI_PROP_NOTPROM, "interrupts");
ddi_prop_exists(9F)
Writing Device Drivers
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |