Managing and Developing Dynamically Loadable Kernel Modules
Managing and Developing Dynamically Loadable Kernel Modules
Developing Dynamically Loadable Kernel Modules
Chapter 12 563
NULL, /* reserved1 */
NULL, /* reserved2 */
NULL, /* reserved3 */
NULL, /* reserved4 */
0 /* d_flags */
};
static wsio_drv_data_t dlclass_wsio_data = {
"pseudo_dlclass", /* drv_path */
T_DEVICE, /* drv_type */
DRV_CONVERGED, /* drv_flags */
NULL, /* drv_minor_build - field not used */
NULL, /* drv_minor_decode - field not used*/
};
static wsio_drv_info_t dlclass_wsio_info = {
&dlclass_drv_info,
&dlclass_drv_ops,
&dlclass_wsio_data,
};
static int (*dlclass_saved_init)();
/*
* LOAD
*/
static int
dlclass_load(void *arg)
{
if (dlclass_debug)
printf("dlclass> Loading\n");
/* Use drv_info passed to us instead of static version */
dlclass_wsio_info.drv_info = (drv_info_t *) arg;
/* Register with WSIO */
if (!wsio_install_driver(&dlclass_wsio_info))
{
printf("dlclass> wsio_install_driver failed!!\n");
return (ENXIO);
}
/* Perform driver-specific initialization, but do not call
* next function in the dev_init list.
*/
(void) dlclass_init();