summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKouhei Sutou <kou@cozmixng.org>2008-09-23 22:33:21 -0700
committerDanny Kukawka <danny.kukawka@web.de>2008-09-23 22:33:21 -0700
commit86fa47a5949f6d6d00cc2fd7f49a6ebccfd5c3e0 (patch)
treeadfccd55470fdb96c6bc2f94f7c9b97fc2daaf81
parent2d83a3c272c7ece4f3b6ffbc19d1754ab5c3b392 (diff)
add support for detecting DVD-R DL media
Added support for detecting DVD-R DL media. https://bugs.freedesktop.org/show_bug.cgi?id=17579
-rw-r--r--hald/linux/probing/linux_dvd_rw_utils.c2
-rw-r--r--hald/linux/probing/probe-volume.c4
-rw-r--r--libhal-storage/libhal-storage.c11
-rw-r--r--libhal-storage/libhal-storage.h3
4 files changed, 18 insertions, 2 deletions
diff --git a/hald/linux/probing/linux_dvd_rw_utils.c b/hald/linux/probing/linux_dvd_rw_utils.c
index 46c3ad44..179975fc 100644
--- a/hald/linux/probing/linux_dvd_rw_utils.c
+++ b/hald/linux/probing/linux_dvd_rw_utils.c
@@ -696,6 +696,8 @@ get_disc_capacity_dvdr_from_type (int fd,
break;
case 0x11: /* DVD-R */
+ case 0x15: /* DVD-R Dual Layer Sequential */
+ case 0x16: /* DVD-R Dual Layer Jump */
case 0x1B: /* DVD+R */
case 0x2B: /* DVD+R Double Layer */
case 0x41: /* BD-R SRM */
diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
index 4293e907..d9ea48da 100644
--- a/hald/linux/probing/probe-volume.c
+++ b/hald/linux/probing/probe-volume.c
@@ -500,6 +500,10 @@ main (int argc, char *argv[])
libhal_changeset_set_property_string (cs, "volume.disc.type", "dvd_rw");
libhal_changeset_set_property_bool (cs, "volume.disc.is_rewritable", TRUE);
break;
+ case 0x15: /* DVD-R Dual Layer Sequential */
+ case 0x16: /* DVD-R Dual Layer Jump */
+ libhal_changeset_set_property_string (cs, "volume.disc.type", "dvd_r_dl");
+ break;
case 0x1A: /* DVD+RW */
libhal_changeset_set_property_string (cs, "volume.disc.type", "dvd_plus_rw");
libhal_changeset_set_property_bool (cs, "volume.disc.is_rewritable", TRUE);
diff --git a/libhal-storage/libhal-storage.c b/libhal-storage/libhal-storage.c
index bd15014c..8b9e1b85 100644
--- a/libhal-storage/libhal-storage.c
+++ b/libhal-storage/libhal-storage.c
@@ -412,7 +412,14 @@ libhal_volume_policy_compute_display_name (LibHalDrive *drive, LibHalVolume *vol
else
name = strdup (_("DVD-R"));
break;
-
+
+ case LIBHAL_VOLUME_DISC_TYPE_DVDR_DL:
+ if (libhal_volume_disc_is_blank (volume))
+ name = strdup (_("Blank DVD-R Dual-Layer"));
+ else
+ name = strdup (_("DVD-R Dual-Layer"));
+ break;
+
case LIBHAL_VOLUME_DISC_TYPE_DVDRW:
if (libhal_volume_disc_is_blank (volume))
name = strdup (_("Blank DVD-RW"));
@@ -1212,6 +1219,8 @@ libhal_volume_from_udi (LibHalContext *hal_ctx, const char *udi)
vol->disc_type = LIBHAL_VOLUME_DISC_TYPE_DVDR;
} else if (strcmp (disc_type_textual, "dvd_rw") == 0) {
vol->disc_type = LIBHAL_VOLUME_DISC_TYPE_DVDRW;
+ } else if (strcmp (disc_type_textual, "dvd_r_dl") == 0) {
+ vol->disc_type = LIBHAL_VOLUME_DISC_TYPE_DVDR_DL;
} else if (strcmp (disc_type_textual, "dvd_plus_r") == 0) {
vol->disc_type = LIBHAL_VOLUME_DISC_TYPE_DVDPLUSR;
} else if (strcmp (disc_type_textual, "dvd_plus_rw") == 0) {
diff --git a/libhal-storage/libhal-storage.h b/libhal-storage/libhal-storage.h
index dd3d7343..d4ee015e 100644
--- a/libhal-storage/libhal-storage.h
+++ b/libhal-storage/libhal-storage.h
@@ -281,7 +281,8 @@ typedef enum {
LIBHAL_VOLUME_DISC_TYPE_HDDVDROM = 0x0d,
LIBHAL_VOLUME_DISC_TYPE_HDDVDR = 0x0e,
LIBHAL_VOLUME_DISC_TYPE_HDDVDRW = 0x0f,
- LIBHAL_VOLUME_DISC_TYPE_MO = 0x10
+ LIBHAL_VOLUME_DISC_TYPE_MO = 0x10,
+ LIBHAL_VOLUME_DISC_TYPE_DVDR_DL = 0x11
} LibHalVolumeDiscType;
LibHalVolume *libhal_volume_from_udi (LibHalContext *hal_ctx,