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.
This commit is contained in:
Martin Pitt
2010-08-30 15:33:26 +02:00
parent d17c065e28
commit 2458db3edd
+8 -7
View File
@@ -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:
case 0x14:
info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile);
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_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);