hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Oct 21 07:48:33 PDT 2008
doc/spec/hal-spec-properties.xml | 26 ++++++++++++++++++++++++++
hald/linux/probing/linux_dvd_rw_utils.c | 8 +++++++-
hald/linux/probing/linux_dvd_rw_utils.h | 21 +++++++++++----------
hald/linux/probing/probe-storage.c | 3 +++
4 files changed, 47 insertions(+), 11 deletions(-)
New commits:
commit bbd1a4dcee50417d081e12b6fdf8c9d090fa384f
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Oct 21 16:39:47 2008 +0200
add support for detect DVD-R DL for storage.cdrom.dvdrdl
Extended HAL to check DVD devices also for capability to
write to DVD-R DL media.
Updated spec to cover all Dual Layer device capabilities.
diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml
index 48251b6..9f8d0f0 100644
--- a/doc/spec/hal-spec-properties.xml
+++ b/doc/spec/hal-spec-properties.xml
@@ -4165,18 +4165,36 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
</row>
<row>
<entry></entry>
+ <entry>dvd_r_dl</entry>
+ <entry></entry>
+ <entry>DVD-R dual layer disc</entry>
+ </row>
+ <row>
+ <entry></entry>
<entry>dvd_plus_r</entry>
<entry></entry>
<entry>DVD+R disc</entry>
</row>
<row>
<entry></entry>
+ <entry>dvd_plus_r_dl</entry>
+ <entry></entry>
+ <entry>DVD+R dual layer disc</entry>
+ </row>
+ <row>
+ <entry></entry>
<entry>dvd_plus_rw</entry>
<entry></entry>
<entry>DVD+RW disc</entry>
</row>
<row>
<entry></entry>
+ <entry>dvd_plus_rw_dl</entry>
+ <entry></entry>
+ <entry>DVD+RW dual layer disc</entry>
+ </row>
+ <row>
+ <entry></entry>
<entry>bd_rom</entry>
<entry></entry>
<entry>BD-ROM disc</entry>
@@ -4664,6 +4682,14 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
</row>
<row>
<entry>
+ <literal>storage.cdrom.dvdrdl</literal> (bool)
+ </entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>TRUE when the optical drive can write to DVD-R Dual-Layer discs</entry>
+ </row>
+ <row>
+ <entry>
<literal>storage.cdrom.dvdram</literal> (bool)
</entry>
<entry></entry>
diff --git a/hald/linux/probing/linux_dvd_rw_utils.c b/hald/linux/probing/linux_dvd_rw_utils.c
index 179975f..c47ca23 100644
--- a/hald/linux/probing/linux_dvd_rw_utils.c
+++ b/hald/linux/probing/linux_dvd_rw_utils.c
@@ -233,8 +233,10 @@ get_dvd_r_rw_profile (int fd)
int profile = (list[i] << 8 | list[i + 1]);
/* 0x13: DVD-RW Restricted Overwrite
* 0x14: DVD-RW Sequential
- * 0x1B: DVD+R
+ * 0x15: DVD-R Dual Layer Sequential
+ * 0x16: DVD-R Dual Layer Jump
* 0x1A: DVD+RW
+ * 0x1B: DVD+R
* 0x2A: DVD+RW DL
* 0x2B: DVD+R DL
* 0x40: BD-ROM
@@ -251,6 +253,10 @@ get_dvd_r_rw_profile (int fd)
case 0x14:
retval |= DRIVE_CDROM_CAPS_DVDRW;
break;
+ case 0x15:
+ case 0x16:
+ retval |= DRIVE_CDROM_CAPS_DVDRDL;
+ break;
case 0x1B:
retval |= DRIVE_CDROM_CAPS_DVDPLUSR;
break;
diff --git a/hald/linux/probing/linux_dvd_rw_utils.h b/hald/linux/probing/linux_dvd_rw_utils.h
index 6f943b1..62f7f3c 100644
--- a/hald/linux/probing/linux_dvd_rw_utils.h
+++ b/hald/linux/probing/linux_dvd_rw_utils.h
@@ -12,16 +12,17 @@
#include <glib.h>
#define DRIVE_CDROM_CAPS_DVDRW 1
-#define DRIVE_CDROM_CAPS_DVDPLUSR 2
-#define DRIVE_CDROM_CAPS_DVDPLUSRW 4
-#define DRIVE_CDROM_CAPS_DVDPLUSRWDL 8
-#define DRIVE_CDROM_CAPS_DVDPLUSRDL 16
-#define DRIVE_CDROM_CAPS_BDROM 32
-#define DRIVE_CDROM_CAPS_BDR 64
-#define DRIVE_CDROM_CAPS_BDRE 128
-#define DRIVE_CDROM_CAPS_HDDVDROM 256
-#define DRIVE_CDROM_CAPS_HDDVDR 512
-#define DRIVE_CDROM_CAPS_HDDVDRW 1024
+#define DRIVE_CDROM_CAPS_DVDRDL 2
+#define DRIVE_CDROM_CAPS_DVDPLUSR 4
+#define DRIVE_CDROM_CAPS_DVDPLUSRW 8
+#define DRIVE_CDROM_CAPS_DVDPLUSRWDL 16
+#define DRIVE_CDROM_CAPS_DVDPLUSRDL 32
+#define DRIVE_CDROM_CAPS_BDROM 64
+#define DRIVE_CDROM_CAPS_BDR 128
+#define DRIVE_CDROM_CAPS_BDRE 256
+#define DRIVE_CDROM_CAPS_HDDVDROM 512
+#define DRIVE_CDROM_CAPS_HDDVDR 1024
+#define DRIVE_CDROM_CAPS_HDDVDRW 2048
int get_dvd_r_rw_profile (int fd);
diff --git a/hald/linux/probing/probe-storage.c b/hald/linux/probing/probe-storage.c
index a8b8d79..46f2531 100644
--- a/hald/linux/probing/probe-storage.c
+++ b/hald/linux/probing/probe-storage.c
@@ -233,6 +233,7 @@ main (int argc, char *argv[])
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvd", FALSE);
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdr", FALSE);
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdrw", FALSE);
+ libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdrdl", FALSE);
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdram", FALSE);
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdplusr", FALSE);
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdplusrw", FALSE);
@@ -265,6 +266,8 @@ main (int argc, char *argv[])
if (profile & DRIVE_CDROM_CAPS_DVDRW)
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdrw", TRUE);
+ if (profile & DRIVE_CDROM_CAPS_DVDRDL)
+ libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdrdl", TRUE);
if (profile & DRIVE_CDROM_CAPS_DVDPLUSR)
libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdplusr", TRUE);
if (profile & DRIVE_CDROM_CAPS_DVDPLUSRW)
More information about the hal-commit
mailing list