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

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

483
484
485
486
487
488
489

490
491
492
493
494
495
496
497
498
499
500
501
502










503
504
505
506
507
508
509
...
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
			set module [file rootname [file tail $module]]
		}

		for {set try 0} {$try < 100} {incr try} {
			if {![info exists alias2module($module)]} {
				# If no exact match found, process wildcard entries
				set found_wildcard_match 0

				foreach alias [array name alias2module_wildcards] {
					if {[string match $alias $module]} {
						set module $alias2module_wildcards($alias)

						set found_wildcard_match 1

						break
					}
				}

				if {!$found_wildcard_match} {
					break
				}










			}

			set module $alias2module($module)
		}

		if {[info exists module2deps($module)]} {
			set load $module2deps($module)
................................................................................
		}
		close $fd
	}

	set failed_to_load [list]
	set able_to_load [list]
	foreach module $modules {
		if {[::tuapi::modprobe $module] == ""} {
			lappend failed_to_load $module
		} else {
			lappend able_to_load $module
		}
	}

	return [list -failed $failed_to_load -loaded $able_to_load]







>




|

|






>
>
>
>
>
>
>
>
>
>







 







|







483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
...
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
			set module [file rootname [file tail $module]]
		}

		for {set try 0} {$try < 100} {incr try} {
			if {![info exists alias2module($module)]} {
				# If no exact match found, process wildcard entries
				set found_wildcard_match 0
				set tmp_matched_modules [list]
				foreach alias [array name alias2module_wildcards] {
					if {[string match $alias $module]} {
						set module $alias2module_wildcards($alias)

						lappend tmp_matched_modules $module

						incr found_wildcard_match 1
					}
				}

				if {!$found_wildcard_match} {
					break
				}

				if {$found_wildcard_match > 1} {
					# Multiple matches, try to pick the best one
					foreach tmp_module $tmp_matched_modules {
						# First, prefer things that do not contain generic
						if {![string match "*generic*" $tmp_module]} {
							set module $tmp_module
						}
					}
				}
			}

			set module $alias2module($module)
		}

		if {[info exists module2deps($module)]} {
			set load $module2deps($module)
................................................................................
		}
		close $fd
	}

	set failed_to_load [list]
	set able_to_load [list]
	foreach module $modules {
		if {[::tuapi::modprobe -args {ata_generic.all_generic_ide=1} $module] == ""} {
			lappend failed_to_load $module
		} else {
			lappend able_to_load $module
		}
	}

	return [list -failed $failed_to_load -loaded $able_to_load]