chiark / gitweb /
cdrom_id: Fix detection of reblanked DVD+RW and DVD-RAM
authorJan Drzewiecki <jonie@icpnet.pl>
Sun, 8 Aug 2010 15:47:08 +0000 (17:47 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 8 Aug 2010 15:47:08 +0000 (17:47 +0200)
commit1ef6c9e9f0f405d1fed403c13c57a233a484bed7
treec358b871cc8bf6bdcd7be8bdf5749da1e5591501
parent232f180397d5786d332c6dc5c08b9c01c1772979
cdrom_id: Fix detection of reblanked DVD+RW and DVD-RAM

Once formatted, DVD+RW and DVD-RAM discs are always reported "complete" by the
drive. Check the if the Volume Descriptor or Volume Descriptor Anchor sectors
are empty, and if so, set the status to blank. If the disc is unformatted the
blank status is maintained and no reads are issued. If the disc is formatted and
read command fails, the status remains set to complete to avoid accidental
blanking.

Bug-Ubuntu: https://launchpad.net/bugs/581925

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
extras/cdrom_id/cdrom_id.c