From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pitt Date: Thu, 23 Apr 2009 07:35:44 +0000 Subject: Re: CD-ROM tray closes automatically after eject due to random Message-Id: <20090423073544.GA4342@piware.de> List-Id: References: <20090421072509.GF3973@piware.de> In-Reply-To: <20090421072509.GF3973@piware.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hello Kay, Kay Sievers [2009-04-23 0:16 +0200]: > Hmm, so we need to find a more reliable way to check for a media. We > probably need to ask the kernel with some cdrom ioctl() instead of > just talking SG_IO here. Indeed I was wondering about that; do you plan to use the CDROM_DISC_STATUS ioctl? I found that quite reliable, and it would keep the fiddly bits in one place in the kernel. Thanks! Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)