FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-21-2011, 06:26 PM
Dan Johansson
 
Default Nedd help with udev-rules.

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!
************************************************** *
 
Old 08-22-2011, 11:44 AM
Dan Johansson
 
Default Nedd help with udev-rules.

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!
************************************************** *
 

Thread Tools




All times are GMT. The time now is 07:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org