prop_op(9E)
NAME
prop_op − report driver property information
SYNOPSIS
#include <sys/types.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixprop_op(dev_t dev, dev_info_t ∗dip
, ddi_prop_op_t prop_op, int flags,
char ∗name, caddr_t valuep, int ∗lengthp
)
ARGUMENTS
dev Device number associated with this device.
dip A pointer to the device information structure for this device.
prop_op Property operator. Valid operators are:
PROP_LEN:
Get property length only. (valuep unaffected)
PROP_LEN_AND_VAL_BUF:
Get length and value into caller’s buffer. (valuep used as input)
PROP_LEN_AND_VAL_ALLOC:
Get length and value into allocated buffer. (valuep returned as pointer to pointer to allocated buffer)
flags The only possible flag value is:
DDI_PROP_DONTPASS: Don’t pass request to parent if property not found.
name Pointer to name of property to be interrogated.
valuep If prop_op is PROP_LEN_AND_VAL_BUF, this should be a pointer to the users buffer. If prop_op is PROP_LEN_AND_VAL_ALLOC, this should be the address of a pointer.
lengthp On exit, ∗lengthp will contain the property length. If prop_op is PROP_LEN_AND_VAL_BUF then before calling prop_op(), lengthp should point to an int that contains the length of callers buffer.
INTERFACE LEVEL
SPARC architecture specific (SPARC DDI). This entry point is Required, but it can be ddi_prop_op(9F).
DESCRIPTION
prop_op() is an entry point which reports the values of certain "properties" of the driver or device to the system. Each driver must have an xxprop_op entry point, but most drivers which do not need to create or manage their own properties can use ddi_prop_op() for this entry point. Then the driver can use ddi_prop_create(9F) to create properties for its device.
RETURN VALUES
prop_op() should return:
DDI_PROP_SUCCESS Property found and returned.
DDI_PROP_NOT_FOUND
Property not found.
DDI_PROP_UNDEFINED Prop explicitly undefined.
DDI_PROP_NO_MEMORY
Property found, but unable to allocate memory. lengthp has the correct property length.
DDI_PROP_BUF_TOO_SMALL
Property found, but the supplied buffer is too small. lengthp has the correct property length.
SEE ALSO
ddi_prop_create(9F), ddi_prop_op(9F)
Sun Microsystems — Last change: 11 Apr 1991