DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
MDI style guidelines

General guidelines


Sample drivers
Copy a sample MDI driver and modify it rather than trying to write an MDI driver from scratch. This is usually easier, and the sample drivers convey style and illustrate techniques and structure that are not explicitly documented.


NOTE: Sample MDI drivers for SVR5 and SCO OpenServer 5 are included in the ndsample and O5ndsamp packages which can be installed from the HDK CD-ROM or downloaded from the HDK homepage.


Initialization
MDI drivers for SVR5 must call the mdi_get_unit(D3mdi) and mdi_printcfg(D3mdi) functions. For DDI 8 drivers, these functions are called from the CFG_ADD subfunction of the config(D2mdi) entry point routine; for DDI 7 drivers, these functions are called from the _load(D2mdi) entry point routine.

MDI drivers for SCO OpenServer 5 must call the printcfg(D3oddi) function from the init(D2oddi) entry pont routine.


Other messages
MDI drivers should not generate unnecessary messages when opening the device or during device operation. MDI drivers should report only one initialization message per driver instance. For DDI drivers, this message is coded in the _load(D2mdi) entry point routine and is generated using the mdi_printcfg(D3mdi) function. For ODDI drivers on SCO OpenServer 5, this message is coded in the init(D2oddi) entry point routine and is generated using the printcfg(D3oddi) function.

© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005