++++ hotplug2/hotplug2.c 2007-06-30 12:59:20.459674000 +0200
+@@ -36,6 +36,7 @@
+ pid_t coldplug_p;
+ int coldplug = 1;
+ int persistent = 0;
++int override = 0;
+ int max_child_c = 20;
+ int dumb = 0;
+ int terminate = 0;
+@@ -324,6 +325,41 @@
+
+ free_hotplug2_event(event);
+ }
++
++int flags_eval(struct hotplug2_event_t *event, struct rules_t *rules) {
++ int flags = FLAG_ALL;
++ int match = 0;
++ int i, j;
++
++ for (i = 0; i < rules->rules_c; i++) {
++ match = 1;
++
++ for (j = 0; j < rules->rules[i].conditions_c; j++) {
++ if (rule_condition_eval(event, &rules->rules[i].conditions[j]) != EVAL_MATCH) {
++ match = 0;
++ break;
++ }
++ }
++
++ /*
++ * Logical AND between flags we've got already and
++ * those we're adding.
++ */
++ if (match) {
++ rule_flags(event, &rules->rules[i]);
++ flags &= rules->rules[i].flags;
++ }
++ }
++
++ /*
++ * A little trick; if no rule matched, we return FLAG_ALL
++ * and have it skipped completely.
++ */
++
++ return flags;
++}
++#else
++#define perform_action(event, rules)
+ #endif
+
+ void perform_dumb_action(struct hotplug2_event_t *event, char *modalias) {
+@@ -390,7 +426,9 @@
+ int size;