* Search for module in all directories listed in the linker_path. */
| 1990 | * Search for module in all directories listed in the linker_path. |
| 1991 | */ |
| 1992 | static char * |
| 1993 | linker_search_kld(const char *name) |
| 1994 | { |
| 1995 | char *cp, *ep, *result; |
| 1996 | int len; |
| 1997 | |
| 1998 | /* qualified at all? */ |
| 1999 | if (strchr(name, '/')) |
| 2000 | return (strdup(name, M_LINKER)); |
| 2001 | |
| 2002 | /* traverse the linker path */ |
| 2003 | len = strlen(name); |
| 2004 | for (ep = linker_path; *ep; ep++) { |
| 2005 | cp = ep; |
| 2006 | /* find the end of this component */ |
| 2007 | for (; *ep != 0 && *ep != ';'; ep++); |
| 2008 | result = linker_lookup_file(cp, ep - cp, name, len, NULL); |
| 2009 | if (result != NULL) |
| 2010 | return (result); |
| 2011 | } |
| 2012 | return (NULL); |
| 2013 | } |
| 2014 | |
| 2015 | static const char * |
| 2016 | linker_basename(const char *path) |
no test coverage detected