HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
m
modpath(2) modpath(2)
NAME
modpath - change global search path for dynamically loadable kernel modules
SYNOPSIS
#include <sys/mod.h>
int modpath(const char *
pathname);
DESCRIPTION
modpath allows users with appropriate privilege to modify the global search path used to locate object
files for dynamically loadable kernel modules. The search path modifications take effect immediately and
affect all subsequent loads for all users on the system.
pathname may be either a colon-separated list of absolute pathnames or NULL. If the former, these path
names represent directories which should be searched for all autoloads of loadable kernel modules and for
demand loads (see modload(2)) where the module is given by a simple file name. This list of directories will
be prepended to the existing list of directories and so will be searched before any directories given in previ-
ous calls to modpath and before the default location which is always searched last. The directories do not
have to exist on the system at the time modpath is called, or when a load actually takes place. If path-
name is equal to NULL, the global search path is set back to its initial default value,
/stand/dlkm/mod.d
.
NOTES
modpath is currently implemented as a macro.
RETURN VALUE
On success, modpath returns 0, otherwise it returns -1 and sets errno to indicate the error.
ERRORS
modpath fails if one or more of the following are true:
[EINVAL] The list of directories specified by pathname is malformed.
[ENOSYS] The Dynamically Loadable Kernel Module feature is not initialized.
[ENAMETOOLONG] pathname is more than
MAXPATHLEN characters long.
[EPERM] The calling process does not have appropriate privilege.
SEE ALSO
kmadmin(1M), modload(2).
HP-UX Release 11i: December 2000 − 1 − Section 2−−157
___
___