LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-06-2012, 04:57 AM   #1
kubuntu-man
Member
 
Registered: Oct 2011
Posts: 36

Rep: Reputation: Disabled
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

Last edited by kubuntu-man; 05-06-2012 at 04:58 AM.
 
Old 05-06-2012, 05:22 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
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.
 
Old 05-07-2012, 02:26 PM   #3
kubuntu-man
Member
 
Registered: Oct 2011
Posts: 36

Original Poster
Rep: Reputation: Disabled
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Udev rules for SCM card reader Phorize Linux - Hardware 2 10-07-2011 02:32 AM
slackware 12.0, udev rules for usb-dev works, but mounting does not work correct paalmarker Linux - General 5 03-30-2010 02:51 AM
udev rules for sandisk 8 in 1 card reader, can't distinguish hedpe Linux - Hardware 4 12-30-2005 04:38 AM
Sandisk USB card Reader not linking /dev/sg0 to /dev/sda acidraven Linux - Hardware 1 06-19-2004 04:56 PM
USB Compact flash card reader hotplug creates /dev/sda but no /dev/sda1 -Mandrake 9.1 bibinono Linux - Hardware 2 08-11-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration