diff options
author | Jan Drzewiecki <jonie@icpnet.pl> | 2010-08-08 19:19:07 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2010-08-08 19:19:07 +0200 |
commit | a6b03c09617354d729cedada9e63dc2a595c0c62 (patch) | |
tree | 0d089a55231419712f92540e7a75b12fe7b3b422 /extras | |
parent | d83dfabe0d75d0c5dd322f05abc1f04d2ca5be6c (diff) |
cdrom_id: Also apply format check to DVD-RW
Extend the DVD+RW/DVD-RAM check in commit 1ef6c9e to also cover DVD-RW, since
in "restricted overwrite" mode they behave similar to DVD+RW.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/cdrom_id/cdrom_id.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index 6500206228..0ec79e677b 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -573,10 +573,10 @@ static int cd_media_info(struct udev *udev, int fd) if (!cd_media_cd_rom) cd_media_state = media_status[header[2] & 3]; - /* DVD+RW discs once formatted are always "complete", DVD-RAM are - * "other" or "complete" if the disc is write protected; we need to - * check the contents if it is blank */ - if ((cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) { + /* DVD+RW discs (and DVD-RW in restricted mode) once formatted are + * always "complete", DVD-RAM are "other" or "complete" if the disc is + * write protected; we need to check the contents if it is blank */ + if ((cd_media_dvd_rw || cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) { unsigned char buffer[17 * 2048]; unsigned char result, len; int block, offset; |