summaryrefslogtreecommitdiff
path: root/packages/mdev/mdev-1.2.1/mdevfirmware.patch
diff options
context:
space:
mode:
authorMichael-Luke Jones <mlj28@cam.ac.uk>2006-09-26 19:30:49 +0000
committerMichael-Luke Jones <mlj28@cam.ac.uk>2006-09-26 19:30:49 +0000
commit95fea465c9286297ec719febbb1231909854cf51 (patch)
treebb940b62148e7a500d59a163bde8fff7db32e1ef /packages/mdev/mdev-1.2.1/mdevfirmware.patch
parentc31179aa7e8ae910b86ca7bd08f795bdf249a289 (diff)
mdev: Add proper firmware loading support to mdev
* Patch contributed by Christian Hohnstaedt * mdev.conf updated to reflect change in firmware loading
Diffstat (limited to 'packages/mdev/mdev-1.2.1/mdevfirmware.patch')
-rw-r--r--packages/mdev/mdev-1.2.1/mdevfirmware.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/mdev/mdev-1.2.1/mdevfirmware.patch b/packages/mdev/mdev-1.2.1/mdevfirmware.patch
new file mode 100644
index 0000000000..8dae2a9921
--- /dev/null
+++ b/packages/mdev/mdev-1.2.1/mdevfirmware.patch
@@ -0,0 +1,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);
+ }
+