how to see device name given by kernel

Kay Sievers kay.sievers at vrfy.org
Sun Nov 13 18:59:45 PST 2005


On Sun, Nov 13, 2005 at 11:01:59PM +0100, Roman Glebov wrote:
> Kay Sievers wrote:
> 
> >On Sun, Nov 13, 2005 at 05:47:49PM +0100, Roman Glebov wrote:
> >
> >>How can i see the name kernel gave to the device ?
> >
> >The name of the device directory in sysfs.
> >
> >>for example in rules.conf of udev you see this KERNEL keys
> >>they come from kernel environment passed to the udev,
> >>but udevmonitor -e does not show them.
> >
> >udev issues are usually handled at:
> > linux-hotplug-devel at lists.sourceforge.net
> >
> >>So what is the way to see what does the kernel pass to udev ?
> >
> >It's simply the last part of the devpath, the string after the
> >last slash you see in udevmonitor. There is no explicit name
> >the kernel exports.
> >
> hmm ok i get following even when i do modprobe kqemu:
> UEVENT[1131919208] add@/module/kqemu
> ACTION=add
> DEVPATH=/module/kqemu
> SUBSYSTEM=module
> SEQNUM=495
> 
> 
> so the device path is /module/kqemu so KERNEL should be kqemu
> so i created the rule :KERNEL=="kqemu",                MODE="0666"
> and placed it to my default config of udevd in 
> /etc/udev/rules.d/50-udev.rule

This is kernel "module" event, not a device. This rule will do nothing.

> restarted udevd

That's not needed.

> but still when i am loading the module the device does not get created .

I don't know this device, but you need to hook into a add@/class/...
event. No other event (besides block) will create any device node.

If you don't see such an event at module load, but the driver is
expected to request a device node, the kernel module does not work correctly.

Kay


More information about the hal mailing list