DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

modstat(2)


modstat -- get information for loadable kernel modules

Synopsis

   #include <sys/mod.h>
   

int modstat(int modid, struct modstatus *stbuf, boolean_t next_modid);

Description

modstat allows processes with privilege P_LOADMOD to obtain information about the currently loaded loadable kernel modules. Any module that has been loaded by the kernel auto-load mechanism or demand-loaded by modload(2) may be queried by modstat.

When passed the module identifier modid, modstat fills up the members of the modstatus structure pointed to by strbuf with information about that module.

If the value of next_modid is B_TRUE, modstat fills up a modstatus structure with information about the module whose module identifier is greater than or equal to modid.

Return values

On success, modstat returns one or more modstatus structures. On failure, modstat returns -1 and sets errno to identify the error.

Errors

In the following conditions, modstat fails and sets errno to:

EINVAL
modid does not match the identifier for any currently loaded module when next_modid is B_FALSE or modid is greater than the identifier for any currently loaded module when next_modid is B_TRUE.

EPERM
The caller does not possess P_LOADMOD privileges.

ENOSYS
Unable to perform the requested operation because the loadable modules functions are not configured into the system.

References

modadmin(1M), modload(2), modstat(2), moduload(2)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004