Skip to contentSkip to conversation

forcing device to appear in subdir

DISCUSSION Jon Smirl 2 participants 7 messages Jan 3, 2004 – Jan 10, 2004

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

DRI devices are supposed to appear in dri/card0, dri/card1, etc.

Right now I achieve this with a rule:
REPLACE, KERNEL="card*", NAME="dri/card%n"

Can I control this via simple_add_class_device() or should I leave it as a rule? If it's a rule it needs to go into the default udev install.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 1 line · Jon Smirl

DRI devices are supposed to appear in dri/card0, dri/card1, etc.

Says the LSB standard?

Quoted 4 lines

Right now I achieve this with a rule:
REPLACE, KERNEL="card*", NAME="dri/card%n"

Can I control this via simple_add_class_device() or should I leave it as a rule?

Nothing you can do in the sysfs tree will create a subdirectory in udev. Leave it as a rule.

Quoted 1 line

If it's a rule it needs to go into the default udev install.

Patches gladly accepted :)

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#2 lore raw
In reply to Jon Smirl
Quoted 4 lines · --- Greg KH
Quoted 1 line · Jon Smirl

DRI devices are supposed to appear in dri/card0, dri/card1, etc.

Says the LSB standard?

What does LSB say on this? It's been dri/cardX ever since dri was created, long before I started working on it.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Jon Smirl
Quoted 8 lines · Jon Smirl
Quoted 4 lines · --- Greg KH
Quoted 1 line · Jon Smirl

DRI devices are supposed to appear in dri/card0, dri/card1, etc.

Says the LSB standard?

What does LSB say on this? It's been dri/cardX ever since dri was created, long before I started working on it.

LSB says to follow what LANANA says, and the LANANA documentation says:

226 char Direct Rendering Infrastructure (DRI)
0 = /dev/dri/card0 First graphics card
1 = /dev/dri/card1 Second graphics card
...

So yup, you should be in your own subdirectory. Care to send me a patch for udev.rules that adds this subdir for all dri devices?

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#4 lore raw
In reply to Jon Smirl

This is what I'm using to force the subdir, is this the best way? Should there be a separate file for rules that are never to be changed?

udev.rules 2003-12-27 11:57:45.000000000 -0500 renamed from rr 2004-01-05 16:59:39.368395445 -0500 +2 -0
@@ -46,3 +46,5 @@
 #REPLACE, KERNEL="ttyS*", NAME="tts/%n"
 #REPLACE, KERNEL="tty*", NAME="vc/%n"
  
+REPLACE, KERNEL="card*", NAME="dri/card%n"
+
Quoted 18 lines · --- Greg KH
Quoted 7 lines · Jon Smirl
Quoted 4 lines · --- Greg KH
Quoted 1 line · Jon Smirl

DRI devices are supposed to appear in dri/card0, dri/card1, etc.

Says the LSB standard?

What does LSB say on this? It's been dri/cardX ever since dri was created,

long

Quoted 1 line

before I started working on it.

LSB says to follow what LANANA says, and the LANANA documentation says:

226 char Direct Rendering Infrastructure (DRI)
0 = /dev/dri/card0 First graphics card
1 = /dev/dri/card1 Second graphics card
...

Quoted 6 lines

So yup, you should be in your own subdirectory. Care to send me a patch for udev.rules that adds this subdir for all dri devices?

thanks,

greg k-h

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#5 lore raw
In reply to Jon Smirl
Quoted 1 line · Jon Smirl

This is what I'm using to force the subdir, is this the best way?

It's a good start. Works for me :)

Quoted 2 lines

Should there be a separate file for rules that are never to be changed?

All rules can be changed, that's why udev has a rules file :)

I'll add a comment in the file about keeping LSB names for dri devices with that rule...

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to Jon Smirl
Quoted 2 lines · Jon Smirl

This is what I'm using to force the subdir, is this the best way? Should there be a separate file for rules that are never to be changed?

Thanks, I've made this change to the file.

I think it's about time we start working on a "default" rule file that works for everyone in a LSB system. And then provide an "example" file to show some rules that might be useful to people.

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel