summaryrefslogtreecommitdiff
path: root/packages/busybox/busybox-static-1.2.1/below.patch
blob: 95e8376e4698d08b56bf2558f8db75f6a7726e93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Index: busybox-1.1.0/modutils/modprobe.c
===================================================================
--- busybox-1.1.0.orig/modutils/modprobe.c	2006-01-11 06:43:56.000000000 +0100
+++ busybox-1.1.0/modutils/modprobe.c	2006-03-14 16:36:54.000000000 +0100
@@ -509,6 +509,41 @@
 					}
 				}
 			}
+			else if ((strncmp (buffer, "below", 5) == 0) && isspace (buffer[5])) {
+				char *mod, *deps;
+				if (parse_tag_value (buffer + 6, &mod, &deps)) {
+					struct dep_t *dt;
+
+					for (dt = first; dt; dt = dt->m_next) {
+						if (strcmp (dt->m_name, mod) == 0)
+							break;
+					}
+					if (dt) {
+						char *pp;
+						char *name;
+
+						pp = name = deps;
+
+						for (;;) {
+							while (*pp != 0 && !isspace (*pp))
+								pp++;
+							if (isspace (*pp))
+								*(pp++) = 0;
+							
+							dt->m_depcnt++;
+							dt->m_deparr = (char **) xrealloc (dt->m_deparr,
+											   sizeof (char *) * dt->m_depcnt);
+							dt->m_deparr[dt->m_depcnt - 1] = bb_xstrdup (name);
+
+							while (isspace (*pp))
+								pp++;
+							name = pp;
+							if (*pp == 0)
+								break;
+						}
+					}
+				}
+			}
 		}
 	}
 	close ( fd );