On Tue, 18 Apr 2006, Patrick Agrain wrote:

> Hi Alan,
> 
> 
> 
> >This isn't a simple mapping.  A single USB device may correspond to 0, 1,
> >or more entries in /dev.  Also, it's not clear why you want to know the
> >major and minor numbers rather than the filename of the /dev entry.
> 
> In that case, what would be the best way to know the device node on which 
> the system bind the plugged device ?

I'm not sure what you mean by "device node".  Do you mean something like 
"/dev/sda"?  There's no good way to do it.  Partly because a single USB 
device can have multiple logical units, each with its own entry in /dev.  
(For example, a device might include both /dev/sda and /dev/sdb.)  Partly 
because even a single logical unit can have multiple entries in 
/dev; they only need to have the same major and minor numbers.  (For 
example, /dev/sda and /dev/usbdisk might refer to the same device.)  
Partly because files in /dev can be renamed or deleted at will.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to