hal/hald/linux2 blockdev.c,1.20,1.21

David Zeuthen david at freedesktop.org
Wed Jul 27 18:17:39 PDT 2005


Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv15547/hald/linux2

Modified Files:
	blockdev.c 
Log Message:
2005-07-27  David Zeuthen  <davidz at redhat.com>

        * hald/linux2/blockdev.c: This is a patch to compute 'nicer' UDIs,
        /org/freedesktop/Hal/devices/volume_empty_%disc.type, for emtpy
        CD/DVD volumes/discs. Patch from Danny Kukawka
        <danny.kukawka at web.de>.



Index: blockdev.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/blockdev.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- blockdev.c	28 Jul 2005 00:55:09 -0000	1.20
+++ blockdev.c	28 Jul 2005 01:17:37 -0000	1.21
@@ -89,6 +89,12 @@
 		} else if (label != NULL && strlen (label) > 0) {
 			hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
 					      "/org/freedesktop/Hal/devices/volume_label_%s", uuid);
+		} else if (hal_device_property_get_bool(d, "volume.is_disc") &&
+			   hal_device_property_get_bool(d, "volume.disc.is_blank")) {
+			/* this should be a empty CD/DVD */
+			hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+                                             "/org/freedesktop/Hal/devices/volume_empty_%s",
+					      hal_device_property_get_string (d, "volume.disc.type"));
 		} else {
 			/* fallback to partition number, size */
 			hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),




More information about the hal-commit mailing list