summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--tools/display_driver_helper14
2 files changed, 5 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index f2a527c..77488ef 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- display_driver_helper: use the new modprobe --resolve-alias instead
+ of manually parsing --dry-run output
+
Version 0.98 - 07 November 2011
- display_driver_helper: allow automatic loading of the implicit driver
on systems without xorg.conf if the presence of other files indicates
diff --git a/tools/display_driver_helper b/tools/display_driver_helper
index 3285bfd..bcf9e91 100644
--- a/tools/display_driver_helper
+++ b/tools/display_driver_helper
@@ -249,15 +249,7 @@ load_driver() {
local modulename
local load_default=1
- # NOTE: UPDATE when module-init-tools is upgraded to get better performance
- # modprobe has -R option:
- #for modulename in $(/home/anssi/module-init-tools-3.12/build/modprobe -Rq "$1"); do
- # modprobe does not have -R option:
- for mod in $(/sbin/modprobe -biqvn "$1"); do
- [ "$mod" = "insmod" ] && continue
- modulename="${mod##*/}"
- modulename="${modulename%%.*}"
-
+ for modulename in $(/sbin/modprobe -Rq "$1"); do
check_driver "$modulename"
case $? in
1) # a driver which needs handling by this script matches
@@ -327,9 +319,7 @@ get_active_kms_drivers() {
device="$(dirname $device)"
[ -f "$device/modalias" ] || continue
modalias="$(cat "$device/modalias")"
- for mod in $(/sbin/modprobe --first-time -biqvn "$modalias" 2>&1); do
- modulename="${mod##*/}"
- modulename="${modulename%%.*}"
+ for modulename in $(/sbin/modprobe -Rq "$modalias"); do
IS_KMS=
check_driver "$modulename" || continue
[ -n "$IS_KMS" ] && echo $modulename