diff --git a/hald/linux/probing/linux_dvd_rw_utils.c b/hald/linux/probing/linux_dvd_rw_utils.c index 7431f1b..f043e79 100644 --- a/hald/linux/probing/linux_dvd_rw_utils.c +++ b/hald/linux/probing/linux_dvd_rw_utils.c @@ -237,6 +237,10 @@ get_dvd_r_rw_profile (int fd) * 0x1A: DVD+RW * 0x2A: DVD+RW DL * 0x2B: DVD+R DL + * 0x40: BD-ROM + * 0x41: BD-R SRM + * 0x42: BR-R RRM + * 0x43: BD-RE */ switch (profile) { @@ -256,6 +260,16 @@ get_dvd_r_rw_profile (int fd) case 0x2B: retval |= DRIVE_CDROM_CAPS_DVDPLUSRDL; break; + case 0x40: + retval |= LIBHAL_STORAGE_ICON_DISC_BDROM; + break; + case 0x41: + case 0x42: + retval |= LIBHAL_STORAGE_ICON_DISC_BDR; + break; + case 0x43: + retval |= LIBHAL_STORAGE_ICON_DISC_BDRE; + break; default: break; } @@ -672,6 +686,7 @@ get_disc_capacity_dvdr_from_type (int fd, case 0x11: /* DVD-R */ case 0x1B: /* DVD+R */ case 0x2B: /* DVD+R Double Layer */ + case 0x41: /* BD-R SRM */ /* READ TRACK INFORMATION */ scsi_command_init (cmd, 0, 0x52); @@ -697,6 +712,13 @@ get_disc_capacity_dvdr_from_type (int fd, retval = 0; break; + case 0x43: /* BD-RE */ + /* Pull the formatted capacity */ + blocks = formats [4 + 0] << 24; + blocks |= formats [4 + 1] << 16; + blocks |= formats [4 + 2] << 8; + blocks |= formats [4 + 3]; + break; default: blocks = 0; break; @@ -739,6 +761,8 @@ get_disc_capacity_for_type (int fd, case 0x2B: case 0x1A: case 0x12: + case 0x41: + case 0x43: retval = get_disc_capacity_dvdr_from_type (fd, type, size); break; default: diff --git a/hald/linux/probing/probe-storage.c b/hald/linux/probing/probe-storage.c index b47971c..2aada07 100644 --- a/hald/linux/probing/probe-storage.c +++ b/hald/linux/probing/probe-storage.c @@ -227,6 +227,12 @@ main (int argc, char *argv[]) libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdplusrwdl", TRUE); if (profile & DRIVE_CDROM_CAPS_DVDPLUSRDL) libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdplusrdl", TRUE); + if (profile & LIBHAL_STORAGE_ICON_DISC_BDROM) + libhal_changeset_set_property_bool (cs, "storage.cdrom.bd", TRUE); + if (profile & LIBHAL_STORAGE_ICON_DISC_BDR) + libhal_changeset_set_property_bool (cs, "storage.cdrom.bdr", TRUE); + if (profile & LIBHAL_STORAGE_ICON_DISC_BDRE) + libhal_changeset_set_property_bool (cs, "storage.cdrom.bdre", TRUE); } if (capabilities & CDC_DVD_R) { libhal_changeset_set_property_bool (cs, "storage.cdrom.dvdr", TRUE); diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c index de30047..86b1cee 100644 --- a/hald/linux/probing/probe-volume.c +++ b/hald/linux/probing/probe-volume.c @@ -180,6 +180,7 @@ advanced_disc_detect (LibHalContext *ctx, const char *udi, LibHalChangeSet *cs, /* set defaults */ libhal_changeset_set_property_bool (cs, "volume.disc.is_videodvd", FALSE); + libhal_changeset_set_property_bool (cs, "volume.disc.is_blurayvideo", FALSE); libhal_changeset_set_property_bool (cs, "volume.disc.is_vcd", FALSE); libhal_changeset_set_property_bool (cs, "volume.disc.is_svcd", FALSE); @@ -255,6 +256,11 @@ advanced_disc_detect (LibHalContext *ctx, const char *udi, LibHalChangeSet *cs, HAL_DEBUG(("Disc in %s is a Video DVD", device_file)); break; } + else if (!strcmp (dirname, "BDMV")) + { + libhal_changeset_set_property_bool (cs, "volume.disc.is_blurayvideo", TRUE); + HAL_DEBUG(("Disc in %s is a Blu-ray video disc", device_file)); + break; else if (!strcmp (dirname, "VCD")) { libhal_changeset_set_property_bool (cs, "volume.disc.is_vcd", TRUE);