summaryrefslogtreecommitdiffstats
path: root/package/hotplug2/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-05-05 18:33:18 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-05-05 18:33:18 +0000
commitca7a8156029b94f9fe0e9d78a2502c0b0db98567 (patch)
treedbb58fde5a662952714b8c7221c94e9ea1c7e445 /package/hotplug2/patches
parent341b6afd554369bcd700dd505210955d521e9ee9 (diff)
downloadmaster-31e0f0ae-ca7a8156029b94f9fe0e9d78a2502c0b0db98567.tar.gz
master-31e0f0ae-ca7a8156029b94f9fe0e9d78a2502c0b0db98567.tar.bz2
master-31e0f0ae-ca7a8156029b94f9fe0e9d78a2502c0b0db98567.zip
use hotplug2 for serializing hotplug events on 2.6
SVN-Revision: 7097
Diffstat (limited to 'package/hotplug2/patches')
-rw-r--r--package/hotplug2/patches/100-rules_override.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/hotplug2/patches/100-rules_override.patch b/package/hotplug2/patches/100-rules_override.patch
new file mode 100644
index 0000000000..0d3b672e68
--- /dev/null
+++ b/package/hotplug2/patches/100-rules_override.patch
@@ -0,0 +1,34 @@
+diff -ur hotplug2.old/hotplug2.c hotplug2.dev/hotplug2.c
+--- hotplug2.old/hotplug2.c 2006-10-08 15:18:23.000000000 +0200
++++ hotplug2.dev/hotplug2.c 2007-05-05 11:38:51.456551560 +0200
+@@ -391,6 +391,7 @@
+ int rv = 0;
+ int i;
+ char *coldplug_command = NULL;
++ char *rules_file = HOTPLUG2_RULE_PATH;
+ sigset_t block_mask;
+
+ struct rules_t *rules = NULL;
+@@ -435,6 +436,13 @@
+ break;
+
+ modprobe_command = *argv;
++ } else if (!strcmp(*argv, "--set-rules-file")) {
++ argv++;
++ argc--;
++ if (argc <= 0)
++ break;
++
++ rules_file = *argv;
+ }
+ }
+ }
+@@ -443,7 +451,7 @@
+ #ifdef HAVE_RULES
+ if (!dumb) {
+ filemap = MAP_FAILED;
+- rule_fd = open(HOTPLUG2_RULE_PATH, O_RDONLY | O_NOATIME);
++ rule_fd = open(rules_file, O_RDONLY | O_NOATIME);
+ if (rule_fd == -1) {
+ dumb = 1;
+ ERROR("rules parse","Unable to open rules file: %s.", strerror(errno));