csx_AccessConfigurationRegister(9F)
csx_Parse_CISTPL_BYTEORDER(9F)
csx_Parse_CISTPL_CFTABLE_ENTRY(9F)
csx_Parse_CISTPL_DEVICEGEO(9F)
csx_Parse_CISTPL_DEVICEGEO_A(9F)
csx_Parse_CISTPL_DEVICE_OA(9F)
csx_Parse_CISTPL_DEVICE_OC(9F)
csx_Parse_CISTPL_LINKTARGET(9F)
csx_Parse_CISTPL_LONGLINK_A(9F)
csx_Parse_CISTPL_LONGLINK_C(9F)
csx_Parse_CISTPL_LONGLINK_MFC(9F)
ddi_get_soft_iblock_cookie(9F)
ddi_intr_get_supported_types(9F)
ddi_prop_lookup_byte_array(9F)
ddi_prop_lookup_int64_array(9F)
ddi_prop_lookup_string_array(9F)
ddi_prop_update_byte_array(9F)
ddi_prop_update_int64_array(9F)
ddi_prop_update_string_array(9F)
ldi_prop_lookup_byte_array(9F)
ldi_prop_lookup_int64_array(9F)
ldi_prop_lookup_string_array(9F)
mac_prop_info_set_default_link_flowctrl(9F)
mac_prop_info_set_default_str(9F)
mac_prop_info_set_default_uint8(9F)
mac_prop_info_set_range_uint32(9F)
net_event_notify_unregister(9F)
net_instance_notify_register(9F)
net_instance_notify_unregister(9F)
net_instance_protocol_unregister(9F)
net_protocol_notify_register(9F)
nvlist_lookup_boolean_array(9F)
nvlist_lookup_boolean_value(9F)
nvlist_lookup_nvlist_array(9F)
nvlist_lookup_string_array(9F)
nvlist_lookup_uint16_array(9F)
nvlist_lookup_uint32_array(9F)
nvlist_lookup_uint64_array(9F)
nvpair_value_boolean_array(9F)
scsi_get_device_type_scsi_options(9F)
usb_get_current_frame_number(9F)
usb_get_max_pkts_per_isoc_request(9F)
usb_pipe_get_max_bulk_transfer_size(9F)
usb_pipe_stop_intr_polling(9F)
usb_pipe_stop_isoc_polling(9F)
- lookup integer property
#include <sys/ddi.h> #include <sys/sunddi.h> int ddi_prop_get_int(dev_t match_dev, dev_info_t *dip, uint_t flags, char *name, int defvalue);
int64_t ddi_prop_get_int64(dev_t match_dev, dev_info_t *dip, uint_t flags, char *name, int64_t defvalue);
Device number associated with property or DDI_DEV_T_ANY.
Pointer to the device info node of device whose property list should be searched.
Possible flag values are some combination of:
Do not pass request to parent device information node if property not found.
Do not look at PROM properties (ignored on platforms that do not support PROM properties).
String containing the name of the property.
An integer value that is returned if the property cannot be found.
Solaris DDI specific (Solaris DDI).
The ddi_prop_get_int() and ddi_prop_get_int64() functions search for an integer property and, if found, returns the value of the property.
Properties are searched for based on the dip, name, match_dev, and the type of the data (integer). 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 defvalue.
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_get_int() and ddi_prop_get_int() will match the request regardless of the match_dev the property was created with. 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.
The return value of the routine is the value of the property. If the property is not found, the argument defvalue is returned as the value of the property.
ddi_prop_get_int64() will not search the PROM for 64-bit property values.
ddi_prop_get_int() and ddi_prop_get_int64() return the value of the property. If the property is not found, the argument defvalue is returned. If the property is found, but cannot be decoded into an int or an int64, then DDI_PROP_NOT_FOUND is returned.
ddi_prop_get_int() and ddi_prop_get_int64() can be called from user or kernel context.
Example 1 Using ddi_prop_get_int()
The following example demonstrates the use of ddi_prop_get_int().
/* * Get the value of the integer "width" property, using * our own default if no such property exists */ width = ddi_prop_get_int(xx_dev, xx_dip, 0, "width", XX_DEFAULT_WIDTH);
ddi_prop_exists(9F), ddi_prop_lookup(9F), ddi_prop_remove(9F), ddi_prop_update(9F)