]> git.pld-linux.org Git - projects/geninitrd.git/blobdiff - mod-sata.sh
no need to mess with magic values, let the "magic" be value
[projects/geninitrd.git] / mod-sata.sh
index 19a234000deca198ef4800656c7168348be24762..949c8a6d19c1851b3a30043f8a19f9060d841b9f 100644 (file)
@@ -3,46 +3,6 @@ SATA_RCSID='$Revision$ $Date::                            $'
 
 # geninitrd mod: sata
 
-# setup geninitrd module
-# @access      public
-setup_mod_sata() {
-       lspci=$(find_tool /sbin/lspci)
-
-       pcimap="/lib/modules/$kernel/modules.pcimap"
-
-       if [ ! -x "$lspci" ]; then
-               warn "Failed to execute lspci. Is pciutils package installed?"
-       fi
-}
-
-# private until only mod-sata uses the function
-find_modules_by_class() {
-       local req_class=$1
-
-       # no pcimap, nothing to lookup from
-       if [ ! -f "$pcimap" ]; then
-               return
-       fi
-
-       if [ -z "$lspci" ]; then
-               return
-       fi
-
-       set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
-
-       local PCI_ANY_ID=0x0000ffff pci_module vendor device subvendor subdevice class class_mask driver_data
-       while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
-               # match class
-               [ "$(($req_class & $class_mask))" = "$class" ] || continue
-               # match vendor
-               [ "$1" = "$vendor" ] || continue
-               # match device, allow PCI_ANY_ID
-               [ "$2" = "$device" -o $device = $PCI_ANY_ID ] || continue
-
-               echo "$pci_module"
-       done < $pcimap
-}
-
 find_modules_sata() {
        debug "Finding SATA modules (class=0x0106)"
 
This page took 0.02823 seconds and 4 git commands to generate.