Lines Matching refs:hotplug_event

45 static void hotplug_event_begin (HotplugEvent *hotplug_event);
50 HotplugEvent *hotplug_event = (HotplugEvent *) end_token;
52 hotplug_events_in_progress = g_slist_remove (hotplug_events_in_progress, hotplug_event);
53 g_free (hotplug_event);
58 hotplug_event_begin_devfs_add (HotplugEvent *hotplug_event, HalDevice *d)
66 HAL_ERROR (("devpath %s already present in store, ignore event", hotplug_event->un.devfs.devfs_path));
72 parent_udi = hal_device_property_get_string (hotplug_event->d, "info.parent");
80 if (strcmp(hotplug_event->un.devfs.devfs_path, "/") != 0) {
81 HAL_ERROR (("Parent is NULL devfs_path=%s parent_udi=%s", hotplug_event->un.devfs.devfs_path, parent_udi ? parent_udi : "<null>"));
95 begin_add_func = hotplug_event->un.devfs.handler->hotplug_begin_add;
99 begin_add_func (hotplug_event->d,
101 hotplug_event->un.devfs.handler,
102 (void *) hotplug_event);
106 g_object_unref (hotplug_event->d);
107 hotplug_event_end ((void *) hotplug_event);
113 hotplug_event_begin_devfs_remove (HotplugEvent *hotplug_event, HalDevice *d)
116 HAL_ERROR (("devpath %s not present in store, ignore event", hotplug_event->un.devfs.devfs_path));
117 hotplug_event_end ((void *) hotplug_event);
123 hotplug_event->un.devfs.devfs_path,
124 (void *) hotplug_event);
128 hotplug_event_begin_devfs (HotplugEvent *hotplug_event)
132 HAL_INFO (("hotplug_event_begin_devfs: %s", hotplug_event->un.devfs.devfs_path));
135 hotplug_event->un.devfs.devfs_path);
137 if (hotplug_event->action == HOTPLUG_ACTION_ADD) {
138 hotplug_event_begin_devfs_add (hotplug_event, d);
139 } else if (hotplug_event->action == HOTPLUG_ACTION_REMOVE) {
140 hotplug_event_begin_devfs_remove (hotplug_event, d);
142 HAL_ERROR (("unsupported action %d", hotplug_event->action));
143 g_object_unref (hotplug_event->d);
144 hotplug_event_end ((void *) hotplug_event);
149 hotplug_event_begin (HotplugEvent *hotplug_event)
151 switch (hotplug_event->type) {
154 hotplug_event_begin_devfs (hotplug_event);
158 HAL_ERROR (("Unknown hotplug event type %d", hotplug_event->type));
159 g_object_unref (hotplug_event->d);
160 hotplug_event_end ((void *) hotplug_event);
166 hotplug_event_enqueue (HotplugEvent *hotplug_event, int front)
172 g_queue_push_head (hotplug_event_queue, hotplug_event);
174 g_queue_push_tail (hotplug_event_queue, hotplug_event);
181 HotplugEvent *hotplug_event;
193 hotplug_event = g_queue_pop_head (hotplug_event_queue);
194 if (hotplug_event == NULL)
197 hotplug_events_in_progress = g_slist_append (hotplug_events_in_progress, hotplug_event);
198 hotplug_event_begin (hotplug_event);