[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Which routine does make dev file of usb char device ?
On Fri, Nov 07, 2008 at 12:38:44AM +0900, J.H.Kim wrote:
> Hi, everyone
>
> I'm looking for codes which makes dev files (for example, /dev/usb/lp0 for
> usb printer) of USB character devices.
>
> Is it udev or kernel driver module?
udev.
> If it is udev, how does it determine the major and minor number of the
> device?
From the "dev" file in the sys/class/... file for the device, or from
the uevent itself. newer versions of udev only use the uevent, and
don't need sysfs.
> The uevent message from kernel for usb printer seems not to include the
> information on the major and minor numbers.
> Captured uevent message for usb printer was like this :
> ACTION=add
> DEVPATH=/devices/pci0000:00/0000:00:1d.3/usb4/4-2/4-2:1.0
> SUBSYSTEM=usb
> DEVTYPE=usb_interface
> DRIVER=usblp
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usblp
> DEVICE=/proc/bus/usb/004/002
> PRODUCT=3f0/8604/100
> TYPE=0/0/0
> INTERFACE=7/1/2
> MODALIAS=usb:v03F0p8604d0100dc00dsc00dp00ic07isc01ip02
> SEQNUM=940
That's not the device that you are looking for to create the dev node.
Wait a bit and look at the uevent for the USB lp0 device.
thanks,
greg k-h
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ