hal/hald/linux block_class_device.c,1.18,1.19
David Zeuthen
david at pdx.freedesktop.org
Tue May 4 14:56:51 PDT 2004
Update of /cvs/hal/hal/hald/linux
In directory pdx:/tmp/cvs-serv11586/hald/linux
Modified Files:
block_class_device.c
Log Message:
2004-05-04 David Zeuthen <david at fubar.dk>
* hald/linux/volume_id/volume_id.c (probe_jfs): test for js == NULL
* hald/linux/block_class_device.c (detect_media):cCall detect_fs
when adding a disc. Also route the child through the TDL and test
the TDL so we don't add more than one child now that we've got a
delay thanks to callouts.
(add_to_gdl): rename to disc_add_to_gdl, since we use it only for
optical discs
2004-05-04 Kay Sievers <kay.sievers at vrfy.org>
* hald/linux/volume_id/volume_id.[ch] : support reading of iso9660
and udf labels
Index: block_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/block_class_device.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- a/block_class_device.c 30 Apr 2004 20:59:08 -0000 1.18
+++ b/block_class_device.c 4 May 2004 21:56:47 -0000 1.19
@@ -363,11 +363,13 @@
}
static void
-add_to_gdl (HalDevice *device, gpointer user_data)
+disc_add_to_gdl (HalDevice *device, gpointer user_data)
{
+ hal_device_store_remove (hald_get_tdl (), device);
hal_device_store_add (hald_get_gdl (), device);
- g_signal_handlers_disconnect_by_func (device, add_to_gdl, user_data);
+ g_signal_handlers_disconnect_by_func (device, disc_add_to_gdl,
+ user_data);
}
/** Check for media on a block device that is not a volume
@@ -486,6 +488,12 @@
hal_device_get_udi (d));
if (child == NULL) {
+ child = hal_device_store_match_key_value_string (
+ hald_get_tdl (), "info.parent",
+ hal_device_get_udi (d));
+ }
+
+ if (child == NULL) {
int type;
char udi[256];
@@ -494,6 +502,7 @@
device_file));
child = hal_device_new ();
+ hal_device_store_add (hald_get_tdl (), child);
/* copy from parent */
hal_device_merge (child, d);
@@ -553,10 +562,11 @@
break;
}
+ detect_fs (child);
/* add new device */
g_signal_connect (child, "callouts_finished",
- G_CALLBACK (add_to_gdl), NULL);
+ G_CALLBACK (disc_add_to_gdl), NULL);
hal_callout_device (child, TRUE);
/* GDL was modified */
More information about the hal-commit
mailing list