71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
.TH "hwgraph.admin" D3X
|
|
.SH NAME
|
|
\f4hwgraph.admin:\f1 device_admin_info_get,
|
|
device_driver_admin_info_get \- retrieve administrative information for device driver
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.ft 3
|
|
#include <sys/types.h>
|
|
#include <sys/hwgraph.h>
|
|
#include <sys/driver.h>
|
|
#include <sys/ddi.h>
|
|
.sp .8v
|
|
char *
|
|
device_admin_info_get( vertex_hdl_t \f2dev_vhdl\fP, char *\f2info_name\fP);
|
|
.sp .8v
|
|
char *
|
|
device_driver_admin_info_get(char *\f2driver_prefix\fP, char *\f2info_name\fP);
|
|
.ft 1
|
|
.fi
|
|
.SS Arguments
|
|
.IP "\f2dev_vhdl\fP"
|
|
Vertex handle of a device vertex in the hwgraph.
|
|
.IP "\f2info_name\fP"
|
|
Character string used as a key to identify desired information.
|
|
.IP "\f2driver_prefix\fP"
|
|
Character string used as device driver's prefix.
|
|
.SH DESCRIPTION
|
|
The
|
|
.IR lboot (1)
|
|
command collects DEVICE_ADMIN and DRIVER_ADMIN directives
|
|
from files in /var/sysgen/system.
|
|
These statements associate arbitrary character strings with
|
|
instances of devices or with device drivers.
|
|
The statement syntax is documented in
|
|
.IR system (4).
|
|
.P
|
|
The DRIVER_ADMIN directive specifies a driver prefix,
|
|
a label string, and a value string.
|
|
.I lboot
|
|
associates the label and value tuple with the driver prefix.
|
|
The driver retrieves the string by calling
|
|
.IR device_driver_admin_info_get ().
|
|
.P
|
|
The DEVICE_ADMIN directive specifies a path in the /hw filesystem,
|
|
a label string, and a value string.
|
|
.I lboot
|
|
stores all three strings.
|
|
When a vertex is created in the hwgraph
|
|
(for example, using
|
|
.IR hwgraph_char_device_add (),
|
|
see
|
|
.IR hwgraph.dev (D3X))
|
|
such that it creates the path given in DEVICE_ADMIN,
|
|
the relevant DEVICE_ADMIN string is retrieved and stored in the vertex.
|
|
The driver can query for an admin string at any time by calling
|
|
.IR device_admin_info_get ().
|
|
.P
|
|
In each case the meaning of the retrieved string is established
|
|
by the driver.
|
|
These facilities allow a device driver to support arbitrary "contracts"
|
|
with the administrator using a single, simple mechanism.
|
|
.SH DIAGNOSTICS
|
|
These functions return NULL when no appropriate information is found,
|
|
or a pointer to a read-only copy of the information string when one is found.
|
|
.SH SEE ALSO
|
|
lboot(1),
|
|
system(4),
|
|
hwgraph.dev(D3X),
|
|
hwgraph.intro(D4X),
|
|
hwgraph.lblinfo(D3X).
|