Device Information Library Functions diprompropdata(3DEVINFO)
NAME
diprompropdata, diprompropnext, diprompropname -
access PROM device information
SYNOPSIS
cc [ flag... ] file... -ldevinfo [ library... ]
#include
diprompropt diprompropnext(dipromhandlet ph, dinodet node,
diprompropt promprop);
char *diprompropname(diprompropt promprop);
int diprompropdata(diprompropt promprop, uchart **propdata);
PARAMETERS
node Handle to a device node in the snapshot of ker-
nel device tree.
ph PROM handle
promprop Handle to a PROM property.
propdata Address of a pointer.
DESCRIPTION
The diprompropnext() function obtains a handle to the
next property on the PROM property list associated with
node. If promprop is DIPROMPROPNIL, the first property
associated with node is returned.
The diprompropname() function returns the name of the
promprop property.
The diprompropdata() function returns the value of the
promprop property. The return value is a non-negative
integer specifying the size in number of bytes in propdata.
All memory allocated by these functions is managed by the
library and must not be freed by the caller.
SunOS 5.11 Last change: 1 Dec 1998 1
Device Information Library Functions diprompropdata(3DEVINFO)
RETURN VALUES
The diprompropdata() function returns the number of bytes
in propdata and propdata is updated to point to a byte
array containing the property value. If 0 is returned, the
property is a boolean property and the existence of this
property indicates the value is true.
The diprompropname() function returns a pointer to a
string that contains the name of promprop.
The diprompropnext() function returns a handle to the
next PROM property. DIPROMPROPNIL is returned if no addi-
tional properties exist.
ERORS
See openprom(7D) for a description of possible errors.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level Safe
SEE ALSO
attributes(5), openprom(7D)
Writing Device Drivers
SunOS 5.11 Last change: 1 Dec 1998 2
|