Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mod_info(9F) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

_fini(9E)

_info(9E)

_init(9E)

modldrv(9S)

modlinkage(9S)

modlstrmod(9S)

mod_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
int mod_remove(struct
int mod_info(struct modlinkage ∗modlinkage,
struct mod_info ∗modinfo)

ARGUMENTS

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 a mod_info structure passed to _info(9E). 

INTERFACE LEVEL

Solaris architecture specific (SunDDI). 

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(), mod_remove(), and mod_info() all return 0 on success and a non-zero value on failure.  Their return values should be used as the return values for _init(), _fini(), and _info() functions, respectively. 

EXAMPLES

For an example of using these functions see _init(9E). 

SEE ALSO

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

SunOS 5.1 Writing Device Drivers

SunOS 5.1  —  Last change: 31 May 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026