FreeBSD/sys/kern/kern_linker.c
/*
 * Lookup KLD which contains requested module in the all directories.
 */
Lookup KLD which contains requested module in the all directories.
Lookup KLD which contains requested module in the all directories .
static char *
linker_search_module(const char *modname, int modnamelen,
    const struct mod_depend *verinfo)
{
	char *cp, *ep, *result;
	for (cp = linker_path; *cp; cp = ep + 1) {
		for (ep = cp; (*ep != 0) && (*ep != ';'); ep++);
		result = linker_hints_lookup(cp, ep - cp, modname,
		    modnamelen, verinfo);
		if (result != NULL)
			return (result);
		if (*ep == 0)
			break;
	}
	return (NULL);
}
static char * linker_search_module ( const char * modname , int modnamelen , const struct mod_depend * verinfo ) { char * cp , * ep , * result ; for ( cp = linker_path ; * cp ; cp = ep + 1 ) { for ( ep = cp ; ( * ep != 0 ) && ( * ep != ' ' ) ; ep ++ ) ; result = linker_hints_lookup ( cp , ep - cp , modname , modnamelen , verinfo ) ; if ( result != NULL ) return ( result ) ; if ( * ep == 0 ) break ; } return ( NULL ) ; }
Lookup KLD which contains requested module in the all directories.
Lookup KLD which contains requested module in the all directories .
/*
	 * traverse the linker path
	 */ /* find the end of this component */