ddi_prop_exists() checks for the existence of a property regardless of the property value data type.
Properties are searched for based on the dip, name, and match_dev. The property search order is as follows:
- Search software properties created by the driver.
- Search the software properties created by the system (or nexus nodes in the device info tree).
- Search the driver global properties list.
- If DDI_PROP_NOTPROM is not set, search the PROM properties (if they exist).
- If DDI_PROP_DONTPASS is not set, pass this request to the parent device information node.
- Return 0 if not found and 1 if found.
Usually, the match_dev argument should be set to the actual device number that this property is associated with. However, if the match_dev argument
is DDI_DEV_T_ANY, then ddi_prop_exists() will match the request regardless of the match_dev the property was created
with. That is the first property whose name matches name will be returned. If a property was created with match_dev set to DDI_DEV_T_NONE then the only way to look up this property is with a match_dev set to DDI_DEV_T_ANY. PROM properties are always created with match_dev set to DDI_DEV_T_NONE.
name must always be set to the name of the property being looked up.
|