|
我使用了<<linux设备驱动>>的scull.ko, #insmod scull.ko后, 会有一个"/sys/module/scull"出现,
想利用udev的自动机制来生成/dev的节点, 编辑udev的规则,放入/etc/udev/rules.d/01-scull.rules,该文件内容为:
KERNEL=="scull", NAME="%k0", SYMLINK+="usbhd0"
但是当我insmod scull.ko时,在/dev目录下并没有生成/dev/scull0 节点,好像该机制没用,我不知道是不是哪里没有设置好,请教大家的解答!
谢谢!
用udevinfo得到的信息:
# udevinfo -a -p /sys/module/scull/
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/module/scull':
KERNEL=="scull"
SUBSYSTEM=="module"
DRIVER==""
ATTR{initstate}=="live"
ATTR{refcnt}=="0" |
|