aboutsummaryrefslogtreecommitdiff
blob: 5cec37406899e6f4f452ca20de34bc5dbb0f46b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From c211f841d9b1d377256b5f8338910aa30e3ffa58 Mon Sep 17 00:00:00 2001
From: Danny Kukawka <danny.kukawka@web.de>
Date: Mon, 11 Aug 2008 16:12:45 +0200
Subject: [PATCH 14/48] fixed device removage

Fixed device removage. Remove childs maually only if they have no
sysfs_path which means they are spawned normaly.
---
 hald/linux/device.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 8bbe949..20cbb06 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -4505,8 +4505,11 @@ hotplug_event_begin_remove_dev (const gchar *subsystem, const gchar *sysfs_path,
 
 				for (tmp = children; tmp != NULL; tmp = g_slist_next (tmp)) {
 			                child = HAL_DEVICE (tmp->data);
-					HAL_INFO(("Remove now: %s as child of: %s", hal_device_get_udi(child), hal_device_get_udi(d)));
-					hal_util_callout_device_remove (child, dev_callouts_remove_child_done, NULL, NULL);
+					/* find childs without sysfs path as e.g. spawned devices*/
+					if (hal_device_property_get_string(child, "linux.sysfs_path") == NULL) {
+						HAL_INFO(("Remove now: %s as child of: %s", hal_device_get_udi(child), hal_device_get_udi(d)));
+						hal_util_callout_device_remove (child, dev_callouts_remove_child_done, NULL, NULL);
+					}
                 		}
 				g_slist_free (children);
 
-- 
1.6.1.2