hwgraph.admin(D3X)
hwgraph.admin: device_admin_info_get, device_driver_admin_info_get - retrieve administrative information for device driver
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME hwgraph.admin: device_admin_info_get, device_driver_admin_info_get - retrieve administrative information for device driver SYNOPSIS #include <sys/types.h> #include <sys/hwgraph.h> #include <sys/driver.h> #include <sys/ddi.h> char * device_admin_info_get( vertex_hdl_t dev_vhdl, char *info_name); char * device_driver_admin_info_get(char *driver_prefix, char *info_name); Arguments dev_vhdl Vertex handle of a device vertex in the hwgraph. info_name Character string used as a key to identify desired information. driver_prefix Character string used as device driver's prefix. DESCRIPTION The 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 system(4). The DRIVER_ADMIN directive specifies a driver prefix, a label string, and a value string. lboot associates the label and value tuple with the driver prefix. The driver retrieves the string by calling device_driver_admin_info_get(). The DEVICE_ADMIN directive specifies a path in the /hw filesystem, a label string, and a value string. lboot stores all three strings. When a vertex is created in the hwgraph (for example, using hwgraph_char_device_add(), see 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 device_admin_info_get(). 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. 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. SEE ALSO lboot(1), system(4), hwgraph.dev(D3X), hwgraph.intro(D4X), hwgraph.lblinfo(D3X).