]> git.pld-linux.org Git - packages/geninitrd.git/blame - geninitrd-svn.patch
- prevent translation issues from happening
[packages/geninitrd.git] / geninitrd-svn.patch
CommitLineData
f5aa6e2b
AM
1Index: functions
2===================================================================
4290db97 3--- functions (wersja 12390)
f5aa6e2b 4+++ functions (kopia robocza)
4290db97
AM
5@@ -189,23 +189,33 @@
6 return
7 fi
f5aa6e2b 8
f5aa6e2b
AM
9- set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
10-
4290db97
AM
11- req_class="0x${req_class}00"
12-
13- local PCI_ANY_ID=0xffffffff pci_module vendor device subvendor subdevice class class_mask driver_data
f5aa6e2b 14- while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
4290db97
AM
15- # ignore program interface (last two digits) - we want any
16- class_mask=$(($class_mask & 0xffffff00))
17- # some devices (like hcd) have very specific class
18- class=$(($class & $class_mask))
19- [ "$(($req_class & $class_mask))" = "$class" ] || continue
f5aa6e2b 20- # match vendor
4290db97 21- [ "$1" = "$vendor" -o "$vendor" = "$PCI_ANY_ID" ] || continue
f5aa6e2b 22- # match device, allow PCI_ANY_ID
4290db97 23- [ "$2" = "$device" -o "$device" = "$PCI_ANY_ID" ] || continue
f5aa6e2b
AM
24-
25- echo "$pci_module"
26- done < $pcimap
4290db97
AM
27+ lspci -p "$pcimap" -kvmmn | awk -vreq_class="${req_class}" '
28+ BEGIN { skip_modules[1]=""; modules[1]=""; xhci=""; ehci=""; ohci=""; uhci="" }
29+ /^Slot:/ { found=0 }
30+ /^Class:/ { if (req_class == $2) { found=1 } }
31+ /^Driver:/ { if (found) {
32+ module=$2;
33+ if (module == "xhci_hcd") {
34+ xhci="xhci_hcd"
35+ } else if (module == "ehci_hcd") {
36+ ehci="ehci_hcd"
37+ } else if (module == "ohci_hcd") {
38+ ohci="ohci_hcd"
39+ } else if (module == "uhci_hcd") {
40+ uhci="uhci_hcd"
41+ } else if (!(module in skip_modules)) {
42+ modules[cnt]=module
43+ }
44+ skip_modules[cnt]=module;
45+ cnt++;
46+ };
47+ found=0
48+ }
49+ END {
50+ # xhci/ehci/ohci/uhci hack to preserve such order
51+ printf "%s %s %s %s", xhci, ehci, ohci, uhci;
52+ for (i in modules) { printf "%s ", modules[i]; };
53+ }
54+ '
55 }
f5aa6e2b 56
fd9645f0
AM
57Index: functions
58===================================================================
59--- functions (wersja 12391)
60+++ functions (kopia robocza)
61@@ -213,7 +213,7 @@
62 }
63 END {
64 # xhci/ehci/ohci/uhci hack to preserve such order
65- printf "%s %s %s %s", xhci, ehci, ohci, uhci;
66+ printf "%s %s %s %s ", xhci, ehci, ohci, uhci;
67 for (i in modules) { printf "%s ", modules[i]; };
68 }
69 '
0f8a6999
AM
70Index: functions
71===================================================================
72--- functions (wersja 12392)
73+++ functions (kopia robocza)
74@@ -189,7 +189,7 @@
75 return
76 fi
77
78- lspci -p "$pcimap" -kvmmn | awk -vreq_class="${req_class}" '
79+ LC_ALL=C lspci -p "$pcimap" -kvmmn | awk -vreq_class="${req_class}" '
80 BEGIN { skip_modules[1]=""; modules[1]=""; xhci=""; ehci=""; ohci=""; uhci="" }
81 /^Slot:/ { found=0 }
82 /^Class:/ { if (req_class == $2) { found=1 } }
This page took 0.034439 seconds and 4 git commands to generate.