|
|
The devinfo(D2) entry point routine provides information about the device that is controlled by the driver.
devinfo( ) is coded as a switch statement with a case for each supported parameter. For this driver, only the DI_SIZE (device size) and the DI_RBCBP and DI_WBCBP (pointers to the bcb(D4) structure for reading and writing) parameters are supplied. DI_RBCBP and DI_WBCBP are required for all non-STREAMS drivers; for this driver, the same coding supports both read and write operations, so the DI_RBCBP: case ``falls through'' to the DI_WBCBP case.
All devinfo( ) routines should return the EOPNOTSUPP errno if an operation is queried but is not supported by the driver.