DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

modpath(2)


modpath -- change loadable kernel modules search path

Synopsis

   #include <sys/mod.h>
   

int modpath(const char *pathname);

Description

modpath allows processes with privilege P_LOADMOD to modify the global search path used to locate object files for loadable kernel modules on disk. The search path modifications take effect immediately and affect all subsequent loads and all users on the system. Affected loads include all auto-loads performed by the kernel auto-load mechanism and all demand-loads performed by modload(2) using a module name.

pathname can specify a colon-separated list of absolute pathnames, or an absolute pathname, or NULL.

If pathname specifies a pathname, the named directories:

If pathname is equal to NULL, the loadable modules search path is reset to its default value /etc/conf/mod.d.

Return values

On success, modpath returns 0. On failure, modpath returns -1 and sets errno to identify the error.

Errors

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

EINVAL
List of directories specified by pathname is malformed.

EPERM
The caller does not possess P_LOADMOD privileges.

ENAMETOOLONG
pathname is more than MAXPATHLEN characters long.

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

References

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