hal/hald/linux block_class_device.c, 1.37, 1.38 class_device.c, 1.18,
1.19 class_device.h, 1.9, 1.10
David Zeuthen
david at pdx.freedesktop.org
Tue Jul 6 16:18:11 PDT 2004
Update of /cvs/hal/hal/hald/linux
In directory pdx:/tmp/cvs-serv11400/hald/linux
Modified Files:
block_class_device.c class_device.c class_device.h
Log Message:
2004-07-07 David Zeuthen <david at fubar.dk>
* hald/linux/block_class_device.c (detect_media, mtab_handle_storage):
Use class_device_move_from_tdl_to_gdl() instead of device_move_from_
tdl_to_gdl() so we get the in_gdl callback when callouts complete
that will detect media and process the mtab to update mount status
* hald/linux/class_device.h: Add class_device_move_from_tdl_to_gdl()
prototype
* hald/linux/class_device.c (class_device_move_from_tdl_to_gdl):
Promote to project wide scope
Index: block_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/block_class_device.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- block_class_device.c 6 Jul 2004 21:36:49 -0000 1.37
+++ block_class_device.c 6 Jul 2004 23:18:08 -0000 1.38
@@ -72,6 +72,8 @@
static void detect_fs (HalDevice *d);
+ClassDeviceHandler block_class_handler;
+
static dbus_bool_t
block_class_accept (ClassDeviceHandler *self,
const char *path,
@@ -579,11 +581,19 @@
}
}
- /* add new device */
- g_signal_connect (
- child, "callouts_finished",
- G_CALLBACK (device_move_from_tdl_to_gdl), NULL);
- hal_callout_device (child, TRUE);
+ {
+ ClassAsyncData *cad =
+ g_new0 (ClassAsyncData, 1);
+ cad->device = child;
+ cad->handler = &block_class_handler;
+ cad->merge_or_add = block_class_handler.merge_or_add;
+
+ /* add new device */
+ g_signal_connect (
+ child, "callouts_finished",
+ G_CALLBACK (class_device_move_from_tdl_to_gdl), cad);
+ hal_callout_device (child, TRUE);
+ }
/* GDL was modified */
return TRUE;
@@ -944,10 +954,18 @@
}
}
- /* add new device */
- g_signal_connect (child, "callouts_finished",
- G_CALLBACK (device_move_from_tdl_to_gdl), NULL);
- hal_callout_device (child, TRUE);
+ {
+ ClassAsyncData *cad =
+ g_new0 (ClassAsyncData, 1);
+ cad->device = child;
+ cad->handler = &block_class_handler;
+ cad->merge_or_add = block_class_handler.merge_or_add;
+
+ /* add new device */
+ g_signal_connect (child, "callouts_finished",
+ G_CALLBACK (class_device_move_from_tdl_to_gdl), cad);
+ hal_callout_device (child, TRUE);
+ }
/* GDL was modified */
return TRUE;
@@ -1767,11 +1785,19 @@
}
}
- /* add new device */
- g_signal_connect (
- child, "callouts_finished",
- G_CALLBACK (device_move_from_tdl_to_gdl), NULL);
- hal_callout_device (child, TRUE);
+ {
+ ClassAsyncData *cad =
+ g_new0 (ClassAsyncData, 1);
+ cad->device = child;
+ cad->handler = &block_class_handler;
+ cad->merge_or_add = block_class_handler.merge_or_add;
+
+ /* add new device */
+ g_signal_connect (
+ child, "callouts_finished",
+ G_CALLBACK (class_device_move_from_tdl_to_gdl), cad);
+ hal_callout_device (child, TRUE);
+ }
/* GDL was modified */
return TRUE;
Index: class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/class_device.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- class_device.c 6 Jul 2004 17:03:48 -0000 1.18
+++ class_device.c 6 Jul 2004 23:18:08 -0000 1.19
@@ -401,7 +401,7 @@
* @param user_data User data provided when connecting the signal
*
*/
-static void
+void
class_device_move_from_tdl_to_gdl (HalDevice *device, gpointer user_data)
{
ClassAsyncData *cad = (ClassAsyncData*) user_data;
Index: class_device.h
===================================================================
RCS file: /cvs/hal/hal/hald/linux/class_device.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- class_device.h 5 Jul 2004 18:21:07 -0000 1.9
+++ class_device.h 6 Jul 2004 23:18:08 -0000 1.10
@@ -292,6 +292,9 @@
const char *udi);
+void class_device_move_from_tdl_to_gdl (HalDevice *device, gpointer user_data);
+
+
/* Convenience structure for passing around multiple pieces of data
to the got_parent_device() functions */
typedef struct {
More information about the hal-commit
mailing list