* Lookup KLD which contains requested module in the all directories. */
| 1965 | * Lookup KLD which contains requested module in the all directories. |
| 1966 | */ |
| 1967 | static char * |
| 1968 | linker_search_module(const char *modname, int modnamelen, |
| 1969 | const struct mod_depend *verinfo) |
| 1970 | { |
| 1971 | char *cp, *ep, *result; |
| 1972 | |
| 1973 | /* |
| 1974 | * traverse the linker path |
| 1975 | */ |
| 1976 | for (cp = linker_path; *cp; cp = ep + 1) { |
| 1977 | /* find the end of this component */ |
| 1978 | for (ep = cp; (*ep != 0) && (*ep != ';'); ep++); |
| 1979 | result = linker_hints_lookup(cp, ep - cp, modname, |
| 1980 | modnamelen, verinfo); |
| 1981 | if (result != NULL) |
| 1982 | return (result); |
| 1983 | if (*ep == 0) |
| 1984 | break; |
| 1985 | } |
| 1986 | return (NULL); |
| 1987 | } |
| 1988 | |
| 1989 | /* |
| 1990 | * Search for module in all directories listed in the linker_path. |
no test coverage detected