From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Krause Date: Sun, 03 Aug 2008 17:38:00 +0000 Subject: Re: cd-tray immediately closed after it has been opened Message-Id: <4895ECF8.9050101@plauener.de> List-Id: References: <488CCA58.7030409@plauener.de> In-Reply-To: <488CCA58.7030409@plauener.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi Kay, Kay Sievers wrote: > Ah, great, thanks for the test. We might just be able to skip optical > drives if cdrom_id did not find a valid media. Does adding this rule > (ID_CDROM_MEDIA_TRACK_COUNT) fix the unwanted tray closing? > > Thanks, > Kay > > --- a/rules/rules.d/60-persistent-storage.rules > +++ b/rules/rules.d/60-persistent-storage.rules > @@ -52,6 +52,8 > > # skip unpartitioned removable media devices from drivers which do > not send "change" events > ENV{DEVTYPE}="disk", KERNEL!="sd*|sr*", ATTR{removable}="1", > GOTO="persistent_storage_end" > +# skip optical drives without media > +ENV{DEVTYPE}="disk", KERNEL="sr*", > ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="persistent_storage_end" > > Sorry for the late answer. I've tried out the patch and it solves the problem for me. Thanks! Best regards, Christian