modstat(S)
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(S)
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(ADM),
modload(S),
modstat(S),
moduload(S)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005