chiark / gitweb /
cdrom_id: Fix media state for unreadable DVDs
authorJan Drzewiecki <jonie@icpnet.pl>
Tue, 26 Oct 2010 16:10:57 +0000 (12:10 -0400)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 26 Oct 2010 16:10:57 +0000 (12:10 -0400)
commitd43e5e5b5a2e27fb75a6e19cca457ca40ad160e4
treea78b10052bd22fc95c01a26b5d6f6df6a2cadc92
parent81956ed1dcdaf02f8d0fc114421e264d5589fe39
cdrom_id: Fix media state for unreadable DVDs

If the disc is unreadable and reading of the first 32 blocks fails set the
cd_media status to 0 (not present). This will prevent udev from executing blkid
next that tries to determine fs on the disc and which in this case may seem to
hang forever locking the drive.

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