diff --git a/hald/linux/hotplug.c b/hald/linux/hotplug.c index 68b0eb2..0b1ca71 100644 --- a/hald/linux/hotplug.c +++ b/hald/linux/hotplug.c @@ -101,9 +101,13 @@ hotplug_event_begin_sysfs (HotplugEvent *hotplug_event) #endif /* subsystem "block" are all block devices */ - if (hotplug_event->type == HOTPLUG_EVENT_SYSFS) - if (strcmp(hotplug_event->sysfs.subsystem, "block") == 0) + if (hotplug_event->type == HOTPLUG_EVENT_SYSFS) { + HAL_DEBUG(("hotplug_event_begin_sysfs: hotplug_event->type == HOTPLUG_EVENT_SYSFS")); + if (strcmp(hotplug_event->sysfs.subsystem, "block") == 0) { + HAL_DEBUG(("hotplug_event_begin_sysfs: hotplug_event->type == HOTPLUG_EVENT_SYSFS; now HOTPLUG_EVENT_SYSFS_BLOCK")); hotplug_event->type = HOTPLUG_EVENT_SYSFS_BLOCK; + } + } /* get device type from already known device object */ if (hotplug_event->type == HOTPLUG_EVENT_SYSFS && d != NULL) { @@ -188,11 +192,14 @@ hotplug_event_begin_sysfs (HotplugEvent *hotplug_event) hotplug_event_end ((void *) hotplug_event); } } else if (hotplug_event->type == HOTPLUG_EVENT_SYSFS_BLOCK) { + HAL_DEBUG(("hotplug_event_begin_sysfs: ********** hotplug_event->type == HOTPLUG_EVENT_SYSFS_BLOCK, ACTION=%d", hotplug_event->action)); if (hotplug_event->action == HOTPLUG_ACTION_ADD || (d == NULL && hotplug_event->action == HOTPLUG_ACTION_CHANGE)) { HalDevice *parent; int range; gboolean is_partition; + + HAL_DEBUG(("hotplug_event_begin_sysfs: ********** action == HOTPLUG_ACTION_ADD or (device=0x%08x) && HOTPLUG_ACTION_CHANGE", d)); /* it's a partition if and only if it doesn't have the range file... * diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c index c753735..1204b6c 100644 --- a/hald/linux/osspec.c +++ b/hald/linux/osspec.c @@ -927,6 +927,8 @@ hal_util_find_known_parent (const gchar *sysfs_path, HalDevice **parent, gchar * char parentdevpath[HAL_PATH_MAX]; gboolean retval = FALSE; + HAL_DEBUG(("hal_util_find_known_parent: sysfs_path='%s'", sysfs_path)); + parent_devpath = g_strdup (sysfs_path); while (TRUE) { if (!get_parent_device (parent_devpath)) @@ -943,8 +945,11 @@ hal_util_find_known_parent (const gchar *sysfs_path, HalDevice **parent, gchar * /* try if the parent chain is constructed by the device-link */ g_snprintf (parentdevpath, HAL_PATH_MAX, "%s/device", sysfs_path); + HAL_DEBUG(("hal_util_find_known_parent: parentdevpath='%s'", parentdevpath)); if ((target = hal_util_readlink (parentdevpath)) != NULL) { + HAL_DEBUG(("hal_util_find_known_parent: target='%s'", target)); parent_devpath = hal_util_get_normalized_path (sysfs_path, target); + HAL_DEBUG(("hal_util_find_known_parent: parent_devpath='%s'", parent_devpath)); while (TRUE) { parent_dev = hal_device_store_match_key_value_string (hald_get_gdl (),