From 2458db3edd8d66827b34978ff471dff8f879e9ab Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 30 Aug 2010 15:33:26 +0200 Subject: [PATCH] cdrom_id: Fix DVD-RW media detection Commit cf2205a19 applied the "restricted overwrite" vs. "sequential" DVD-RW test to feature_profiles() (which reads the drive capabilities), which caused every DVD medium to be detected as ID_CDROM_MEDIA_DVD_RW. Now apply it to cd_profiles() instead, to just check the current profile. --- extras/cdrom_id/cdrom_id.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index f9d6e0bc..8480d7b3 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -297,14 +297,9 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si cd_dvd_ram = 1; break; case 0x13: - info(udev, "profile 0x%02x media_dvd_rw\n", profile); - cd_media_dvd_rw = 1; - cd_media_dvd_rw_ro = 1; - break; case 0x14: info(udev, "profile 0x%02x dvd_rw\n", profile); cd_dvd_rw = 1; - cd_media_dvd_rw_seq = 1; break; case 0x1B: info(udev, "profile 0x%02x dvd_plus_r\n", profile); @@ -486,10 +481,16 @@ static int cd_profiles(struct udev *udev, int fd) cd_media_dvd_ram = 1; break; case 0x13: + info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile); + cd_media = 1; + cd_media_dvd_rw = 1; + cd_media_dvd_rw_ro = 1; + break; case 0x14: - info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile); + info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile); cd_media = 1; cd_media_dvd_rw = 1; + cd_media_dvd_rw_seq = 1; break; case 0x1B: info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile); -- 2.39.5