hal/libhal-storage libhal-storage.c, 1.16, 1.17 libhal-storage.h, 1.10, 1.11

David Zeuthen david at freedesktop.org
Fri Jul 15 12:54:35 PDT 2005


Update of /cvs/hal/hal/libhal-storage
In directory gabe:/tmp/cvs-serv25645/libhal-storage

Modified Files:
	libhal-storage.c libhal-storage.h 
Log Message:
2005-07-15  David Zeuthen  <davidz at redhat.com>

	I added support for detection of DVD+R Dual-Layer write
	support (new key: storage.cdrom.dvdplusrdl). Here a fix for DVD+R
	DL media in libhal_volume_policy_compute_display_name(). Patches
	from Danny Kukawka <danny.kukawka at web.de>.

	* libhal-storage/libhal-storage.h: 

	* libhal-storage/libhal-storage.c (libhal_drive_policy_compute_display_name)
	(libhal_volume_policy_compute_display_name): 

	* hald/linux2/probing/probe-storage.c (main): 

	* hald/linux2/probing/linux_dvd_rw_utils.c (get_dvd_r_rw_profile): 

	* doc/spec/hal-spec.xml.in: 



Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- libhal-storage.c	28 Jun 2005 15:47:51 -0000	1.16
+++ libhal-storage.c	15 Jul 2005 19:54:31 -0000	1.17
@@ -277,11 +277,19 @@
 		if (drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRAM)
 			second = "/DVD-RAM";
 		if ((drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDR) &&
-		    (drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR))
-			second = "/DVD±R";
+		    (drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR)) {
+			if(drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL)
+				second = "/DVD±R DL";
+			else
+				second = "/DVD±R";
+		}
 		if ((drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRW) &&
-		    (drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW))
-			second = "/DVD±RW";
+		    (drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW)) {
+                        if(drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL)
+                                second = "/DVD±RW DL";
+                        else
+                                second = "/DVD±RW";
+                }
 
 
 		if (drive_is_hotpluggable) {
@@ -430,6 +438,13 @@
 			else
 				name = strdup (_("DVD+RW Disc"));
 			break;
+		
+		case LIBHAL_VOLUME_DISC_TYPE_DVDPLUSR_DL:
+			if (libhal_volume_disc_is_blank (volume))
+				name = strdup (_("Blank DVD+R Dual-Layer Disc"));
+			else
+				name = strdup (_("DVD+R Dual-Layer Disc"));
+			break;
 		}
 		
 		/* Special case for pure audio disc */
@@ -865,6 +880,7 @@
 		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvd", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDROM);
 		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusr", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR);
 		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusrw", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW);
+		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusrdl", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL);
 		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdr", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDR);
 		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdrw", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDRW);
 		LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdram", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDRAM);

Index: libhal-storage.h
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- libhal-storage.h	28 Jun 2005 15:47:51 -0000	1.10
+++ libhal-storage.h	15 Jul 2005 19:54:32 -0000	1.11
@@ -176,7 +176,9 @@
 	LIBHAL_DRIVE_CDROM_CAPS_DVDR       = 0x0020,
 	LIBHAL_DRIVE_CDROM_CAPS_DVDRW      = 0x0040,
 	LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR   = 0x0080,
-	LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW  = 0x0100
+	LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW  = 0x0100,
+	LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL = 0x0120
+
 } LibHalDriveCdromCaps;
 
 LibHalDrive         *libhal_drive_from_udi                    (LibHalContext *hal_ctx, 




More information about the hal-commit mailing list