From: "Kevin P. Fleming" <kpfleming@cox.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Question about Hot device Identity
Date: Thu, 26 Jun 2003 04:10:29 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-105660090310183@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-105633765700944@msgid-missing>
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
next prev parent reply other threads:[~2003-06-26 4:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-23 3:04 Question about Hot device Identity Guo, Min
2003-06-23 3:22 ` Greg KH
2003-06-24 7:01 ` Guo, Min
2003-06-24 16:20 ` Greg KH
2003-06-25 2:24 ` Guo, Min
2003-06-25 2:33 ` Greg KH
2003-06-25 9:05 ` Guo, Min
2003-06-25 14:45 ` Kevin P. Fleming
2003-06-25 17:00 ` Greg KH
2003-06-26 2:24 ` Guo, Min
2003-06-26 4:10 ` Kevin P. Fleming [this message]
2003-06-26 7:42 ` Guo, Min
2003-06-26 17:13 ` Greg KH
2003-06-26 19:05 ` Greg KH
2003-06-26 19:08 ` Greg KH
2003-06-27 2:00 ` Guo, Min
2003-06-27 3:18 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-105660090310183@msgid-missing \
--to=kpfleming@cox.net \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.