public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Nedd help with udev-rules.
@ 2011-08-21 18:26 Dan Johansson
  2011-08-22 11:44 ` Dan Johansson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Johansson @ 2011-08-21 18:26 UTC (permalink / raw
  To: gentoo-user

Hi,

I need some help with writing udev-rules for capi.
After playing around some I decided to ask for help here as can't really get 
it to work.

What I want ist the following:
/dev/capi20	68,0
/dev/capi/capi# 191,#

68,0 = Major 68, Minor 0
191,# = Major 191, Minor 0 untill 31

If I have no udev-rule I get the following:
/dev/capi		68,0
/dev/capi#	191,#

with 'ATTR{dev}="68:0", NAME="capi20" ' added I only get the following:
/dev/capi20	191,32

and with 'ATTR{dev}="191:[0-9]*", NAME="capi/capi%n" ' the following:
/dev/capi/capi	68,0
/dev/capi/capi#	191,#

And with both '"ATTR{dev}="68:0", NAME="capi20" ' and  'ATTR{dev}="191:
[0-9]*", NAME="capi/capi%n" ' this:
/dev/capi/capi	68,0
/dev/capi/capi#	191,#
(No change in comparison with only the 'ATTR{dev}=191:...' rule)

And if I change the order in the rules-file:
/dev/capi20	191,31


Can some udev-crack (or someone else) tell my what I am doing wrong?

 Regards,
-- 
Dan Johansson, <http://www.dmj.nu>
***************************************************
This message is printed on 100% recycled electrons!
***************************************************



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-user] Nedd help with udev-rules.
  2011-08-21 18:26 [gentoo-user] Nedd help with udev-rules Dan Johansson
@ 2011-08-22 11:44 ` Dan Johansson
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Johansson @ 2011-08-22 11:44 UTC (permalink / raw
  To: gentoo-user

On Sunday 21 August 2011 20.26:40 Dan Johansson wrote:
> Hi,
> 
> I need some help with writing udev-rules for capi.
> After playing around some I decided to ask for help here as can't really
> get it to work.
> 
> What I want ist the following:
> /dev/capi20	68,0
> /dev/capi/capi# 191,#
> 
> 68,0 = Major 68, Minor 0
> 191,# = Major 191, Minor 0 untill 31
> 
> If I have no udev-rule I get the following:
> /dev/capi		68,0
> /dev/capi#	191,#
> 
> with 'ATTR{dev}="68:0", NAME="capi20" ' added I only get the following:
> /dev/capi20	191,32
> 
> and with 'ATTR{dev}="191:[0-9]*", NAME="capi/capi%n" ' the following:
> /dev/capi/capi	68,0
> /dev/capi/capi#	191,#
> 
> And with both '"ATTR{dev}="68:0", NAME="capi20" ' and  'ATTR{dev}="191:
> [0-9]*", NAME="capi/capi%n" ' this:
> /dev/capi/capi	68,0
> /dev/capi/capi#	191,#
> (No change in comparison with only the 'ATTR{dev}=191:...' rule)
> 
> And if I change the order in the rules-file:
> /dev/capi20	191,31
> 
> 
> Can some udev-crack (or someone else) tell my what I am doing wrong?
> 
>  Regards,
Hi again,

I found the problem (me). The correct syntax should be:
ATTR{dev}=="68:0", NAME="capi20" 
ATTR{dev}=="191:[0-9]*", NAME="capi/capi%n" 

Notice the '==' instead of '=' after ATTR{dev}.

Cheers,
-- 
Dan Johansson, <http://www.dmj.nu>
***************************************************
This message is printed on 100% recycled electrons!
***************************************************



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-22 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-21 18:26 [gentoo-user] Nedd help with udev-rules Dan Johansson
2011-08-22 11:44 ` Dan Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox