Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]

Diff markup

Differences between /ldd-examples/scullp/scullp_load (Version 2.6.31.13) and /ldd-examples/scullp/scullp_load (Version 2.6.25.8)


  1 #!/bin/sh                                         
  2 module="scullp"                                   
  3 device="scullp"                                   
  4 mode="664"                                        
  5                                                   
  6 # Group: since distributions do it differently    
  7 if grep '^staff:' /etc/group > /dev/null; then    
  8     group="staff"                                 
  9 else                                              
 10     group="wheel"                                 
 11 fi                                                
 12                                                   
 13 # remove stale nodes                              
 14 rm -f /dev/${device}?                             
 15                                                   
 16 # invoke insmod with all arguments we got         
 17 # and use a pathname, as newer modutils don't     
 18 /sbin/insmod -f ./$module.ko $* || exit 1         
 19                                                   
 20 major=`cat /proc/devices | awk "\\$2==\"$modul    
 21                                                   
 22 mknod /dev/${device}0 c $major 0                  
 23 mknod /dev/${device}1 c $major 1                  
 24 mknod /dev/${device}2 c $major 2                  
 25 mknod /dev/${device}3 c $major 3                  
 26 ln -sf ${device}0  /dev/${device}                 
 27                                                   
 28 # give appropriate group/permissions              
 29 chgrp $group /dev/${device}[0-3]                  
 30 chmod $mode  /dev/${device}[0-3]                  
                                                      
  This page was automatically generated by the LXR engine.