hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Thu Dec 6 11:03:09 PST 2007
hald/linux/osspec.c | 50 +++++++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 23 deletions(-)
New commits:
commit 0fb2fa20a3368f0a73432822eb652fece1f46803
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Thu Dec 6 20:02:56 2007 +0100
linux: ignore uevents for modules and driver
Make HAL ignore uevents for subsystem=={modules,driver}. We don't
use them currently (AFAIK) and don't need to run code if we get them.
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index fa9dc69..25da9dd 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -229,32 +229,36 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
hotplug_event->sysfs.seqnum, action, hotplug_event->sysfs.subsystem, hotplug_event->sysfs.sysfs_path,
hotplug_event->sysfs.device_file, hotplug_event->sysfs.net_ifindex));
- if (strcmp (action, "add") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_ADD;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
- }
+ /* ignore module and driver events, until we really need them */
+ if ((strcmp (hotplug_event->sysfs.subsystem, "drivers") != 0) &&
+ (strcmp (hotplug_event->sysfs.subsystem, "module") != 0)) {
+ if (strcmp (action, "add") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_ADD;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
- if (strcmp (action, "change") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_CHANGE;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
- }
+ if (strcmp (action, "change") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_CHANGE;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
- if (strcmp (action, "move") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_MOVE;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
- }
+ if (strcmp (action, "move") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_MOVE;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
- if (strcmp (action, "remove") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_REMOVE;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
+ if (strcmp (action, "remove") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_REMOVE;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
}
invalid:
More information about the hal-commit
mailing list