From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Zeuthen Date: Wed, 24 Mar 2010 17:07:52 +0000 Subject: Re: Make an un-device? Message-Id: <1269450472.28921.13.camel@localhost.localdomain> List-Id: References: <20100324124352.0978847e@zooty> In-Reply-To: <20100324124352.0978847e@zooty> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, 2010-03-24 at 12:43 -0400, Tom Horsley wrote: > Usually people want to know how to make udev recognize > devices. I have a device that is recognized just fine, but > I'd really like to declare it an un-device. I don't > want any /dev/ files created for it, I don't want the > driver loaded unless something else needs it. I want > it to disappear from creation completely. > > Can custom udev rules do this? Not specifically - ignore_device used to do something like this but we removed that directive from udev... and even if we still had the ignore_device directive, suppressing events at the udev level is wrong.. and that's why we removed ignore_device. > Specifically, the device is the incredibly annoying fake CD > drive that appears along side my usb hard disk > when I plug it in. One way to make such annoying drives disappear in GNOME and some other desktop environments is to set the UDISKS_PRESENTATION_HIDE (or if you are on an older distro than F13 vintage, it's called DKD_PRESENTATION_HIDE) udev property like e.g. this http://cgit.freedesktop.org/udisks/tree/data/80-udisks.rules#n188 Another way to solve this is adding an entry to something like one of the unusual_* files under drivers/usb/storage in the kernel... but that includes recompiling the kernel. HTH, David