- dep = bb_xstrndup ( deps, next - deps - ext + 1 );
-
- current-> m_depcnt++;
- current-> m_deparr = (char **) xrealloc ( current-> m_deparr, sizeof ( char *) * current-> m_depcnt );
- current-> m_deparr [current-> m_depcnt - 1] = dep;
-
- //printf ( " %d) %s\n", current-> m_depcnt, current-> m_deparr [current-> m_depcnt -1] );
- p = next + 2;
- } while (next < end);
- }
-
- if ( buffer [l-1] == '\\' )
- continuation_line = 1;
- else
- continuation_line = 0;
- }
- close ( fd );
-
- // alias parsing is not 100% correct (no correct handling of continuation lines within an alias) !
-
- if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 )
- if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 )
- return first;
-
- continuation_line = 0;
- while ( reads ( fd, buffer, sizeof( buffer ))) {
- int l;
- char *p;
-
- p = strchr ( buffer, '#' );
- if ( p )
- *p = 0;
-
- l = bb_strlen ( buffer );
-
- while ( l && isspace ( buffer [l-1] )) {
- buffer [l-1] = 0;
- l--;
- }
-
- if ( l == 0 ) {
- continuation_line = 0;
- continue;
- }
-
- if ( !continuation_line ) {
- if (( strncmp ( buffer, "alias", 5 ) == 0 ) && isspace ( buffer [5] )) {
- char *alias, *mod;
-
- if ( parse_tag_value ( buffer + 6, &alias, &mod )) {
- // fprintf ( stderr, "ALIAS: '%s' -> '%s'\n", alias, mod );
-
- if ( !current ) {
- first = current = (struct dep_t *) xmalloc ( sizeof ( struct dep_t ));
- }
- else {
- current-> m_next = (struct dep_t *) xmalloc ( sizeof ( struct dep_t ));
- current = current-> m_next;
- }
- current-> m_module = bb_xstrdup ( alias );
- current-> m_isalias = 1;
-
- if (( strcmp ( alias, "off" ) == 0 ) || ( strcmp ( alias, "null" ) == 0 )) {
- current-> m_depcnt = 0;
- current-> m_deparr = 0;
- }
- else {
- current-> m_depcnt = 1;
- current-> m_deparr = xmalloc ( 1 * sizeof( char * ));
- current-> m_deparr[0] = bb_xstrdup ( mod );
- }
- current-> m_next = 0;
+ filename2modname(tokens[1], wildcard);
+
+ for (l = G.probes; l != NULL; l = l->link) {
+ m = (struct module_entry *) l->data;
+ if (fnmatch(wildcard, m->modname, 0) != 0)
+ continue;
+ rmod = filename2modname(tokens[2], NULL);
+ llist_add_to(&m->realnames, rmod);
+
+ if (m->flags & MODULE_FLAG_NEED_DEPS) {
+ m->flags &= ~MODULE_FLAG_NEED_DEPS;
+ G.num_unresolved_deps--;