]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/module-init-tools-3.2.2-modprobe-1.patch
Pakfire laedt die Listen jetzt besser und hat eine veraenderte Oberflaeche bekommen.
[ipfire-2.x.git] / src / patches / module-init-tools-3.2.2-modprobe-1.patch
CommitLineData
9b0ff0a0
MT
1Submitted By: Bruce Dubbs (bdubbs at linuxfromscratch dot org)
2Date: 2006-07-15
3Initial Package Version: 3.2.2
4Origin:
5Upstream Status: This is fixed in 3.3-pre1
6Description: Updates modprobe functionality to fix problem where
7aliases don't quite work properly
8
9--- module-init-tools-3.2.2/modprobe.c 2005-12-01 15:42:09.000000000 -0800
10+++ module-init-tools-3.3-pre1/modprobe.c 2006-02-04 15:18:07.000000000 -0800
11@@ -990,13 +990,27 @@
12 return ret;
13 }
14
15+/* Careful! Don't munge - in [ ] as per Debian Bug#350915 */
16 static char *underscores(char *string)
17 {
18 if (string) {
19 unsigned int i;
20- for (i = 0; string[i]; i++)
21- if (string[i] == '-')
22- string[i] = '_';
23+ int inbracket = 0;
24+ for (i = 0; string[i]; i++) {
25+ switch (string[i]) {
26+ case '[':
27+ inbracket++;
28+ break;
29+ case ']':
30+ inbracket--;
31+ break;
32+ case '-':
33+ if (!inbracket)
34+ string[i] = '_';
35+ }
36+ }
37+ if (inbracket)
38+ warn("Unmatched bracket in %s\n", string);
39 }
40 return string;
41 }