mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-12 21:01:31 +03:00
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7490 3c298f89-4303-0410-b956-a3cf2f4a3e73
36 lines
956 B
Diff
36 lines
956 B
Diff
Index: hotplug2-0.9/hotplug2.c
|
|
===================================================================
|
|
--- hotplug2-0.9.orig/hotplug2.c 2007-06-04 13:21:41.134723240 +0200
|
|
+++ hotplug2-0.9/hotplug2.c 2007-06-04 13:21:41.203712752 +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));
|