Device Information Library Functions
diproplookupbytes(3DEVINFO)
NAME
diproplookupbytes, diproplookupints,
diproplookupint64, diproplookupstrings - search for a
property
SYNOPSIS
cc [ flag... ] file... -ldevinfo [ library... ]
#include
int diproplookupbytes(devt dev, dinodet node,
const char *propname, uchart **propdata);
int diproplookupints(devt dev, dinodet node,
const char *propname, int **propdata);
int diproplookupint64(devt dev, dinodet node,
const char *propname, int64t **propdata);
int diproplookupstrings(devt dev, dinodet node,
const char *propname, char **propdata);
PARAMETERS
dev devt of minor node with which the property is
associated. DIDEVTANY is a wild card that
matches all devt's, including DIDEVTNONE.
node Handle to the device node with which the pro-
perty is associated.
propdata For diproplookupbytes(), the address to a
pointer to an array of unsigned characters con-
taining the property data.
For diproplookupints(), the address to a
pointer to an array of integers containing the
property data.
For diproplookupint64(), the address to a
pointer to an array of 64-bit integers contain-
ing the property data.
For diproplookupstrings(), the address to a
pointer to a buffer containing a concatenation
of null-terminated strings containing the pro-
perty data.
SunOS 5.11 Last change: 26 Mar 2001 1
Device Information Library Functions
diproplookupbytes(3DEVINFO)
propname Name of the property for which to search.
DESCRIPTION
These functions return the value of a known property name
type and devt value. All memory allocated by these func-
tions is managed by the library and must not be freed by the
caller.
RETURN VALUES
If the property is found, the number of entries in propdata
is returned. If the property is a boolean type, 0 is
returned and the existence of this property indicates the
value is true. Otherwise, -1 is returned and errno is set to
indicate the error.
ERORS
These functions will fail if:
EINVAL Invalid argument.
ENOTSUP The snapshot contains no property information.
ENXIO The property does not exist; try
dipromproplookup*().
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level Safe
SEE ALSO
diinit(3DEVINFO), dipromproplookupbytes(3DEVINFO),
libdevinfo(3LIB), attributes(5)
Writing Device Drivers
SunOS 5.11 Last change: 26 Mar 2001 2
Device Information Library Functions
diproplookupbytes(3DEVINFO)
SunOS 5.11 Last change: 26 Mar 2001 3
|