/[soft]/drakx-kbd-mouse-x11/trunk/tools/display_driver_helper
ViewVC logotype

Diff of /drakx-kbd-mouse-x11/trunk/tools/display_driver_helper

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3917 by anssi, Fri Dec 2 21:32:31 2011 UTC revision 3918 by anssi, Thu Apr 5 02:49:21 2012 UTC
# Line 9  Line 9 
9  # - Get information about enabled driver modules  # - Get information about enabled driver modules
10  # - Check that the loaded modules are correct  # - Check that the loaded modules are correct
11  #  #
12    # Note that drivers not known by this script are handled normally, i.e.
13    # loaded automatically as udev normally would've.
14    #
15  # Licensed under terms of GPLv2 or later.  # Licensed under terms of GPLv2 or later.
16  #  #
17  # When updating, check:  # When updating, check:
# Line 17  Line 20 
20  # - check_dkms_status function  # - check_dkms_status function
21  #  #
22    
23    # DEBUG_DISPLAY_DRIVER_HELPER=yes
24    
25  if [ -n "$DEBUG_DISPLAY_DRIVER_HELPER" ]; then  if [ -n "$DEBUG_DISPLAY_DRIVER_HELPER" ]; then
26          echo "$(date) $*" >> /dev/ddh_debug          echo "$(date) $*" >> /dev/ddh_debug
27          exec 2>>/dev/ddh_debug          exec 2>>/dev/ddh_debug
# Line 196  get_xorg_drivers() { Line 201  get_xorg_drivers() {
201  }  }
202    
203  # Note: no /usr  # Note: no /usr
204  # parameter 1: xorg driver  # parameter 1: KMS module or xorg driver
205  # parameter 2: 1 the check if the driver is explicitely enabled  # parameter 2: 1 - check if the driver is explicitely enabled
206  #              0 means that check only for conflicts  #              0 - check only for conflicts
207  check_xorg() {  check_xorg() {
208          local driver="$1"          local driver="$1"
209          local explicit_only="$2"          local explicit_only="$2"
# Line 246  check_xorg() { Line 251  check_xorg() {
251  # Load the driver for the specified modalias, if configured.  # Load the driver for the specified modalias, if configured.
252  # Note: no /usr  # Note: no /usr
253  load_driver() {  load_driver() {
254            local modalias="$1"
255          local modulename          local modulename
256          local load_default=1          local load_default=1
257    
258          for modulename in $(/sbin/modprobe -Rq "$1"); do          for modulename in $(/sbin/modprobe -Rq "$modalias"); do
259                  check_driver "$modulename"                  check_driver "$modulename"
260                  case $? in                  case $? in
261                  1)      # a driver which needs handling by this script matches                  1)      # a driver which needs handling by this script matches
# Line 277  load_driver() { Line 283  load_driver() {
283    
284          # no specially handled modules were loaded, so load all modules normally          # no specially handled modules were loaded, so load all modules normally
285          # unless $load_default was set above          # unless $load_default was set above
286          [ -z "$load_default" ] || /sbin/modprobe -b "$1"          [ -z "$load_default" ] || /sbin/modprobe -b "$modalias"
287  }  }
288    
289  is_kms_allowed() {  is_kms_allowed() {
# Line 378  Known actions: Line 384  Known actions:
384          Does --check-dkms-status and --check-loaded.          Does --check-dkms-status and --check-loaded.
385    
386    --check-loaded-strict    --check-loaded-strict
387          As --check-loaded, and consider ambigious cases (e.g. nvidia where          As --check-loaded, and consider ambiguous cases (e.g. nvidia where
388          we can't detect if the loaded driver has the correct version) as          we can't detect if the loaded driver has the correct version) as
389          failure.          failure.
390    

Legend:
Removed from v.3917  
changed lines
  Added in v.3918

  ViewVC Help
Powered by ViewVC 1.1.30