chiark / gitweb /
rules: run vol_id on opticals only if media is found
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 2 Aug 2008 08:26:48 +0000 (10:26 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 2 Aug 2008 08:26:48 +0000 (10:26 +0200)
commitf755fd5657b619fd27160ad202fc5d773d096e9c
tree1af37563a52b27ef8e6e3d94f11d1c6fc3cb96c3
parente8e9cd5d739447d58288e6251e533b07f8352928
rules: run vol_id on opticals only if media is found

Opening an optical drive device node without O_NONBLOCK autocloses the
tray, we run vol_id on every media change by kernel emitted "change"
events, which can make it hard to change the media when the tray closes
immediatey again.:) We check for cdrom_id to indicate an existing track,
if no media is found, we will not open the device with vol_id.

Thanks to Christian Krause and DavidZ for debugging and testing.
rules/rules.d/60-persistent-storage.rules