Check-in [2d04941e48]
Overview
SHA1:2d04941e48088476fae067111043c7707b7b1493
Date: 2014-12-22 18:31:31
User: rkeene
Comment:Updated to try to make scanning smarter
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-12-22
20:12
[e1d82ef47f] Updated to reverse the order of dependencies, as appears to be done in the modules.dep file (user: rkeene, tags: trunk)
18:31
[2d04941e48] Updated to try to make scanning smarter (user: rkeene, tags: trunk)
18:13
[70b183f4c0] Added support for passing arguments to kernel modules (user: rkeene, tags: trunk)
Changes

Modified tuapi.tcl from [859e0dd2e7] to [7646d583b1].

   483    483   			set module [file rootname [file tail $module]]
   484    484   		}
   485    485   
   486    486   		for {set try 0} {$try < 100} {incr try} {
   487    487   			if {![info exists alias2module($module)]} {
   488    488   				# If no exact match found, process wildcard entries
   489    489   				set found_wildcard_match 0
          490  +				set tmp_matched_modules [list]
   490    491   				foreach alias [array name alias2module_wildcards] {
   491    492   					if {[string match $alias $module]} {
   492    493   						set module $alias2module_wildcards($alias)
   493    494   
   494         -						set found_wildcard_match 1
          495  +						lappend tmp_matched_modules $module
   495    496   
   496         -						break
          497  +						incr found_wildcard_match 1
   497    498   					}
   498    499   				}
   499    500   
   500    501   				if {!$found_wildcard_match} {
   501    502   					break
   502    503   				}
          504  +
          505  +				if {$found_wildcard_match > 1} {
          506  +					# Multiple matches, try to pick the best one
          507  +					foreach tmp_module $tmp_matched_modules {
          508  +						# First, prefer things that do not contain generic
          509  +						if {![string match "*generic*" $tmp_module]} {
          510  +							set module $tmp_module
          511  +						}
          512  +					}
          513  +				}
   503    514   			}
   504    515   
   505    516   			set module $alias2module($module)
   506    517   		}
   507    518   
   508    519   		if {[info exists module2deps($module)]} {
   509    520   			set load $module2deps($module)
................................................................................
   582    593   		}
   583    594   		close $fd
   584    595   	}
   585    596   
   586    597   	set failed_to_load [list]
   587    598   	set able_to_load [list]
   588    599   	foreach module $modules {
   589         -		if {[::tuapi::modprobe $module] == ""} {
          600  +		if {[::tuapi::modprobe -args {ata_generic.all_generic_ide=1} $module] == ""} {
   590    601   			lappend failed_to_load $module
   591    602   		} else {
   592    603   			lappend able_to_load $module
   593    604   		}
   594    605   	}
   595    606   
   596    607   	return [list -failed $failed_to_load -loaded $able_to_load]