summaryrefslogtreecommitdiff
path: root/packages/mdev/mdev-1.2.1/mdevfirmware.patch
blob: 8dae2a99215986d0d73138c167a1a75632b4e01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- busybox-1.2.1/util-linux/mdev.c.orig	2006-07-01 00:42:13.000000000 +0200
+++ busybox-1.2.1/util-linux/mdev.c	2006-09-26 17:42:38.414162744 +0200
@@ -255,7 +255,16 @@
 			bb_show_usage();
 
 		sprintf(temp, "/sys%s", env_path);
-		if (!strcmp(action, "add")) make_device(temp,0);
+		if (!strcmp(action, "add")) {
+			struct stat st;
+			make_device(temp,0);
+			sprintf(temp, "/lib/mdev/%s", getenv("SUBSYSTEM"));
+			if (stat(temp, &st) == 0) {
+				if ((st.st_mode & S_IXUSR) && S_ISREG(st.st_mode)) {
+					system(temp);
+				}
+			}
+		}
 		else if (!strcmp(action, "remove")) make_device(temp,1);
 	}