SVN: geninitrd/trunk/mod-sata.sh
glen
glen at pld-linux.org
Fri Feb 11 13:30:28 CET 2011
Author: glen
Date: Fri Feb 11 13:30:27 2011
New Revision: 12143
Modified:
geninitrd/trunk/mod-sata.sh
Log:
sort modules that ones who depend on libata are first
Modified: geninitrd/trunk/mod-sata.sh
==============================================================================
--- geninitrd/trunk/mod-sata.sh (original)
+++ geninitrd/trunk/mod-sata.sh Fri Feb 11 13:30:27 2011
@@ -51,10 +51,18 @@
# 0107 - SAS
local m modules=$(find_modules_by_class 0106)
- # FIXME: how to handle if multiple modules returned?
- # i.e two modules can do same id
- # currently we load all of them...
+ # sort modules that ones who depend on libata are first
+ # this is best we could think of now :)
+ local left right
for m in $modules; do
+ if NEW_MODINFO=1 modinfo -k $kernel -F depends $m | grep -q libata; then
+ left="$left $m"
+ else
+ right="$right $m"
+ fi
+ done
+
+ for m in $left $right; do
find_module $m
done
}
More information about the pld-cvs-commit
mailing list