From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kevin P. Fleming" Date: Thu, 26 Jun 2003 04:10:29 +0000 Subject: Re: Question about Hot device Identity Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Guo, Min wrote: > I can not find the file dev in the /sys/class/usb, does it means that > Udev does not support my USB CDROM? If not, which file is behalf of > my USB CDROM device? > I think you've missed the point here. There is no such thing as a "generic" USB device that could have a dev file for it in /sys/class/usb. For a device to have a dev file, it must have some sort of device-specific driver talking to it. If that driver exists and is loaded, it will (or should) have a class of its own under /sys/class, and the dev file will be there. In the case of a USB CD-ROM, that is handled by the usb-storage driver, but that driver _still_ does not create a dev file, because it does not directly expose itself to userspace (there is no way to talk to the usb-storage driver itself). usb-storage connects the device the SCSI midlayer, which then attaches the sd (SCSI disk) driver to the device. _That_ driver is actually a real device that the user can interact with, so it creates a dev file in the appropriate place, namely /sys/block. You can think of /sys/block as a special-case class, and consider it equivalent to /sys/class/block (although it's more than that). The only devices that will ever have "dev" files in /sys for them are those that can actually can communicated with from userspace. There is no need for userspace to treat your USB CD-ROM as a USB CD-ROM, instead it just considers it to be a generic disk (block) device that holds read-only media. I don't see any reason this device will ever generate any directories under /sys/class/... with dev files in them, they're not necessary. But, this has nothing to do with whether udev can support your device or not and create a node in /dev for it. udev should be able to do exactly that, but I don't know whether it currently looks only at /sys/class (which I think is the case) or whether it also looks at /sys/block. ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel