randomconfig fixes
[oweals/busybox.git] / examples / depmod.pl
index 8c6548d280c8dc9660a22a4e138948cc6f464e18..809dc08b39e85de8b384ccaeddc237262162ac27 100755 (executable)
@@ -173,6 +173,9 @@ sub add_mod_deps
 
        $depth .= " ";
        warn "${depth}loading deps of module: $this_module\n" if $verbose;
+       if (length($depth) > 50) {
+               die "too much recursion (circular dependencies in modules?)";
+       }
 
        foreach my $md (keys %{$mod->{$this_module}}) {
                add_mod_deps ($depth, $mod, $mod2, $module, $md);
@@ -196,7 +199,7 @@ if ($stdout == 0) {
     open(STDOUT, ">$basedir/modules.dep")
                              or die "cannot open $basedir/modules.dep: $!";
 }
-my $kseries = $basedir =~ m,/2\.6\.[^/]*, ? '2.6' : '2.4';
+my $kseries = $basedir =~ m,/2\.4\.[^/]*, ? '2.4' : 'others';
 
 foreach my $module ( keys %$mod ) {
     if($kseries eq '2.4') {