FreeBSD/sys/kern/kern_linker.c
/*
 * Search for module in all directories listed in the linker_path.
 */
Search for module in all directories listed in the linker_path.
Search for module in all directories listed in the linker_path .
static char *
linker_search_kld(const char *name)
{
	char *cp, *ep, *result;
	int len;
	if (strchr(name, '/'))
		return (strdup(name, M_LINKER));
	len = strlen(name);
	for (ep = linker_path; *ep; ep++) {
		cp = ep;
		for (; *ep != 0 && *ep != ';'; ep++);
		result = linker_lookup_file(cp, ep - cp, name, len, NULL);
		if (result != NULL)
			return (result);
	}
	return (NULL);
}
static char * linker_search_kld ( const char * name ) { char * cp , * ep , * result ; int len ; if ( strchr ( name , ' ' ) ) return ( strdup ( name , M_LINKER ) ) ; len = strlen ( name ) ; for ( ep = linker_path ; * ep ; ep ++ ) { cp = ep ; for ( ; * ep != 0 && * ep != ' ' ; ep ++ ) ; result = linker_lookup_file ( cp , ep - cp , name , len , NULL ) ; if ( result != NULL ) return ( result ) ; } return ( NULL ) ; }
Search for module in all directories listed in the linker_path.
Search for module in all directories listed in the linker_path .
/* qualified at all? */ /* traverse the linker path */ /* find the end of this component */