Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversmod_install(9F)


NAME

 mod_install, mod_remove, mod_info - add, remove or query a loadable module

SYNOPSIS

 
#include <sys/modctl.h>
int mod_install(struct modlinkage *modlinkage);
 int mod_remove(struct modlinkage *modlinkage);
 int mod_info(struct modlinkage *modlinkage, struct modinfo *modinfo);

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI).

PARAMETERS

 
modlinkage
Pointer to the loadable module's modlinkage structure which describes what type(s) of module elements are included in this loadable module.
modinfo
Pointer to the modinfo structure passed to _info(9E).

DESCRIPTION

 

mod_install() must be called from a module's _init(9E) routine.

mod_remove() must be called from a module's _fini(9E) routine.

mod_info() must be called from a module's _info(9E) routine.

RETURN VALUES

 

mod_install() and mod_remove() return 0 upon success and non-zero on failure. mod_info() returns a non-zero value on success and 0 upon failure.

EXAMPLES

 

See _init(9E) for an example that uses these functions.

SEE ALSO

 

_fini(9E), _info(9E), _init(9E), modldrv(9S), modlinkage(9S), modlstrmod(9S)

Writing Device Drivers


SunOS 5.9Go To TopLast Changed 19 Sep 1994

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.