]> git.pld-linux.org Git - packages/geninitrd.git/blame - geninitrd-svn.patch
- rel 4; fix mod-sata finding too much bug
[packages/geninitrd.git] / geninitrd-svn.patch
CommitLineData
bfd51b89
AM
1Index: geninitrd
2===================================================================
3--- geninitrd (wersja 12174)
4+++ geninitrd (kopia robocza)
5@@ -772,9 +772,9 @@
6 device=$rootdev
7 fi
8
9- [ -n "$ROOTFSFLAG" ] && ROOTFSFLAGS="-o $ROOTFSFLAGS"
10+ [ -n "$ROOTFSFLAGS" ] && ROOTFSFLAGS="-o $ROOTFSFLAGS"
11
12- mount -t $rootfs -r $device $ROOTFSFLAGS /newroot
13+ mount -t $rootfs -r $device $ROOTFSFLAGS /newroot || echo "Mount of rootfs failed."
14 init="$(echo "$CMDLINE" | busybox awk '/init=\// { gsub(/.*init=/,NIL,$0); gsub(/ .*/,NIL,$0); print }')"
15 if [ -z "$init" -o ! -x "/newroot$init" ]; then
16 init=/sbin/init
77403d90
AM
17Index: geninitrd
18===================================================================
19--- geninitrd (wersja 12182)
20+++ geninitrd (kopia robocza)
21@@ -709,7 +709,7 @@
22 rootnr="$(busybox awk -v rootnode="${ROOT##/dev/}" '$4 == rootnode { print 256 * $1 + $2 }' /proc/partitions)"
23 # fallback to ls
24 if [ -z "$rootnr" ]; then
25- rootnr="$(busybox ls -lL ${ROOT} | awk '{if (/^b/) { print 256 * $3 + $4; }}')"
26+ rootnr="$(busybox ls -lL ${ROOT} | busybox awk '{if (/^b/) { print 256 * $3 + $4; }}')"
27 fi
28 if [ -n "$rootnr" ]; then
29 echo "$rootnr" > /proc/sys/kernel/real-root-dev
02d6660e
AM
30Index: mod-sata.sh
31===================================================================
32--- mod-sata.sh (wersja 12194)
33+++ mod-sata.sh (kopia robocza)
34@@ -17,7 +17,7 @@
35
36 # private until only mod-sata uses the function
37 find_modules_by_class() {
38- local class=$1
39+ local req_class=$1
40
41 # no pcimap, nothing to lookup from
42 if [ ! -f "$pcimap" ]; then
43@@ -28,10 +28,12 @@
44 return
45 fi
46
47- set -- $($lspci -n | awk -vclass=$class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
48+ set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
49
50 local PCI_ANY_ID=0x0000ffff pci_module vendor device subvendor subdevice class class_mask driver_data
51 while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
52+ # match class
53+ [ "$(($req_class & $class_mask))" = "$class" ] || continue
54 # match vendor
55 [ "$1" = "$vendor" ] || continue
56 # match device, allow PCI_ANY_ID
This page took 0.032123 seconds and 4 git commands to generate.