Contents of /trunk/hal/patches/hal-0.5.10-linux-ignore-uevents-for-modules-and-driver.patch
Parent Directory | Revision Log
Revision 597 -
(show annotations)
(download)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 2619 byte(s)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 2619 byte(s)
-gentoo patches
1 | From ac7df885d2015794abd8c06570466a368092c320 Mon Sep 17 00:00:00 2001 |
2 | From: Danny Kukawka <danny.kukawka@web.de> |
3 | Date: Thu, 6 Dec 2007 20:02:56 +0100 |
4 | Subject: [PATCH] linux: ignore uevents for modules and driver |
5 | |
6 | Make HAL ignore uevents for subsystem=={modules,driver}. We don't |
7 | use them currently (AFAIK) and don't need to run code if we get them. |
8 | --- |
9 | hald/linux/osspec.c | 50 +++++++++++++++++++++++++++----------------------- |
10 | 1 files changed, 27 insertions(+), 23 deletions(-) |
11 | |
12 | diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c |
13 | index fa9dc69..25da9dd 100644 |
14 | --- a/hald/linux/osspec.c |
15 | +++ b/hald/linux/osspec.c |
16 | @@ -229,32 +229,36 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data) |
17 | hotplug_event->sysfs.seqnum, action, hotplug_event->sysfs.subsystem, hotplug_event->sysfs.sysfs_path, |
18 | hotplug_event->sysfs.device_file, hotplug_event->sysfs.net_ifindex)); |
19 | |
20 | - if (strcmp (action, "add") == 0) { |
21 | - hotplug_event->action = HOTPLUG_ACTION_ADD; |
22 | - hotplug_event_enqueue (hotplug_event); |
23 | - hotplug_event_process_queue (); |
24 | - goto out; |
25 | - } |
26 | + /* ignore module and driver events, until we really need them */ |
27 | + if ((strcmp (hotplug_event->sysfs.subsystem, "drivers") != 0) && |
28 | + (strcmp (hotplug_event->sysfs.subsystem, "module") != 0)) { |
29 | + if (strcmp (action, "add") == 0) { |
30 | + hotplug_event->action = HOTPLUG_ACTION_ADD; |
31 | + hotplug_event_enqueue (hotplug_event); |
32 | + hotplug_event_process_queue (); |
33 | + goto out; |
34 | + } |
35 | |
36 | - if (strcmp (action, "change") == 0) { |
37 | - hotplug_event->action = HOTPLUG_ACTION_CHANGE; |
38 | - hotplug_event_enqueue (hotplug_event); |
39 | - hotplug_event_process_queue (); |
40 | - goto out; |
41 | - } |
42 | + if (strcmp (action, "change") == 0) { |
43 | + hotplug_event->action = HOTPLUG_ACTION_CHANGE; |
44 | + hotplug_event_enqueue (hotplug_event); |
45 | + hotplug_event_process_queue (); |
46 | + goto out; |
47 | + } |
48 | |
49 | - if (strcmp (action, "move") == 0) { |
50 | - hotplug_event->action = HOTPLUG_ACTION_MOVE; |
51 | - hotplug_event_enqueue (hotplug_event); |
52 | - hotplug_event_process_queue (); |
53 | - goto out; |
54 | - } |
55 | + if (strcmp (action, "move") == 0) { |
56 | + hotplug_event->action = HOTPLUG_ACTION_MOVE; |
57 | + hotplug_event_enqueue (hotplug_event); |
58 | + hotplug_event_process_queue (); |
59 | + goto out; |
60 | + } |
61 | |
62 | - if (strcmp (action, "remove") == 0) { |
63 | - hotplug_event->action = HOTPLUG_ACTION_REMOVE; |
64 | - hotplug_event_enqueue (hotplug_event); |
65 | - hotplug_event_process_queue (); |
66 | - goto out; |
67 | + if (strcmp (action, "remove") == 0) { |
68 | + hotplug_event->action = HOTPLUG_ACTION_REMOVE; |
69 | + hotplug_event_enqueue (hotplug_event); |
70 | + hotplug_event_process_queue (); |
71 | + goto out; |
72 | + } |
73 | } |
74 | |
75 | invalid: |
76 | -- |
77 | 1.5.3.7 |
78 |