LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   udev rules for USB card reader: how to get rid of oroginal dev nodes ? (https://www.linuxquestions.org/questions/linux-general-1/udev-rules-for-usb-card-reader-how-to-get-rid-of-oroginal-dev-nodes-943489/)

kubuntu-man 05-06-2012 03:57 AM

udev rules for USB card reader: how to get rid of oroginal dev nodes ?
 
Hi there,

I have written some udev rules for my USB card reader. Here they are:

Code:

KERNEL=="sd[a-z]", ATTRS{vendor}=="Generic", ATTRS{model}=="USB CF Reader", NAME{all_partitions}="card_cf", group=plugdev
KERNEL=="sd[a-z]", ATTRS{vendor}=="Generic", ATTRS{model}=="USB SD Reader", NAME{all_partitions}="card_sd", group=plugdev
KERNEL=="sd[a-z]", ATTRS{vendor}=="Generic", ATTRS{model}=="USB MS Reader", NAME{all_partitions}="card_ms", group=plugdev
KERNEL=="sd[a-z]", ATTRS{vendor}=="Generic", ATTRS{model}=="USB SM Reader", NAME{all_partitions}="card_sm", group=plugdev

They work fine (i.e. my device nodes like /dev/card_sd are created), but ...

they are created additionally to the original entries (like /dev/sde). I would like to have only my own dev node entries.

Does anybody know how to get rid of the /dev/ node that corresponds to the KERNEL name ?

My system is Ubuntu 12.04 (64 bit)

Thanks and Regards,
Kubuntu-Man

catkin 05-06-2012 04:22 AM

The udev man page does not suggest that it is possible to do what you want:
Quote:

Changing the node name from the kernel's default creates inconsistencies and is not supported. If the kernel and NAME specify different names, an error will be logged. Udev is only expected to handle device node permissions and to create additional symlinks, not to change kernel-provided device node names.

kubuntu-man 05-07-2012 01:26 PM

Oh, what a pity ...

To be honest, I did not read the man page. I only read some documents in the web, e.g. http://www.reactivated.net/writing_udev_rules.html and there is a note about renaming devices (but no further explanation).


All times are GMT -5. The time now is 09:16 PM.