* udev.rules.devfs patch
@ 2004-01-15 14:23 John L. Fjellstad
2004-01-15 14:49 ` Kay Sievers
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: John L. Fjellstad @ 2004-01-15 14:23 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: clearsigned data --]
[-- Type: Text/Plain, Size: 493 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here is a patch for udev.rules.devfs to make it closer to devfs layout.
Basically, added discs/disc? directories, and the cdrom directory
- --
John L. Fjellstad
web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iEYEARECAAYFAkAGon4ACgkQkz0vhQtHHRhGlACgyGxHvvwnhlHsmTl11C32NHkB
1WwAoMBdiMwkWmtg7FKkDTOc+QYRGltt
=mOcE
-----END PGP SIGNATURE-----
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1737 bytes --]
--- udev.rules.devfs.orig 2004-01-15 15:14:53.000000000 +0100
+++ udev.rules.devfs 2004-01-15 15:19:49.000000000 +0100
@@ -16,11 +16,19 @@
# If this is not a partition, it will result in 'disc'
#
+# if this is an ide cdrom, put it in the cdroms directory and create symlinks
+# first matching rule decides the name
+BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="cdroms/cdrom%m", SYMLINK="cdrom dvd"
+
# ide block devices
-BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
-BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
-BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
-BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
+BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc0/%D"
+BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D", SYMLINK="discs/disc1/%D"
+BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D", SYMLINK="discs/disc2/%D"
+BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D", SYMLINK="discs/disc3/%D"
+
+# scsi block devices
+BUS="scsi", id="0:0:0:0", NAME="scsi/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc4/%D"
+BUS="scsi", id="0:0:0:1", NAME="scsi/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc5/%D"
# md block devices
KERNEL="md[0-9]*", NAME="md/%n"
@@ -49,13 +57,13 @@
KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
# loop devices
-KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
+KERNEL="loop[0-9]*", NAME="loop/%n"
# ramdisks
-KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
+KERNEL="ram[0-9]*", NAME="rd/%n"
# framebuffer devices
-KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
+KERNEL="fb[0-9]*", NAME="fb/%n"
# misc
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev.rules.devfs patch
2004-01-15 14:23 udev.rules.devfs patch John L. Fjellstad
@ 2004-01-15 14:49 ` Kay Sievers
2004-01-15 15:00 ` Martin Hicks
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-01-15 14:49 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 15, 2004 at 03:23:55PM +0100, John L. Fjellstad wrote:
Content-Description: clearsigned data
> Here is a patch for udev.rules.devfs to make it closer to devfs layout.
> Basically, added discs/disc? directories, and the cdrom directory
> -BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
> +BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc0/%D"
How do you know, that the disc number you use is free?
Did you try the ide-devfs.sh? We take care of it with the script.
Greg, I would be happy to remove the ugly %D at all.
It's unable to handle cdroms, an the 'dis[ck]'/'partition' thing is easy done by two rules.
Then the dis[ck] decision is also up to the user :)
Kay
-------------------------------------------------------
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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev.rules.devfs patch
2004-01-15 14:23 udev.rules.devfs patch John L. Fjellstad
2004-01-15 14:49 ` Kay Sievers
@ 2004-01-15 15:00 ` Martin Hicks
2004-01-15 15:07 ` Kay Sievers
2004-01-15 21:43 ` Greg KH
3 siblings, 0 replies; 5+ messages in thread
From: Martin Hicks @ 2004-01-15 15:00 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 15, 2004 at 03:49:10PM +0100, Kay Sievers wrote:
> On Thu, Jan 15, 2004 at 03:23:55PM +0100, John L. Fjellstad wrote:
> Content-Description: clearsigned data
> > Here is a patch for udev.rules.devfs to make it closer to devfs layout.
> > Basically, added discs/disc? directories, and the cdrom directory
>
> > -BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
> > +BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc0/%D"
>
> How do you know, that the disc number you use is free?
> Did you try the ide-devfs.sh? We take care of it with the script.
>
> Greg, I would be happy to remove the ugly %D at all.
> It's unable to handle cdroms, an the 'dis[ck]'/'partition' thing is easy done by two rules.
> Then the dis[ck] decision is also up to the user :)
Please don't get rid of %D. I just started using it. The problem that
I'm dealing with is that the directory where the devfs names are created
are unpredictable so my callout returns the directory that I'm to create
the devfs names in and I do something like:
BUS="scsi", CALLOUT="blah", ID="*", NAME="%c/%D", SYMLINK="%c/theAlias"
thanks
mh
--
Martin Hicks Wild Open Source Inc.
mort@wildopensource.com 613-266-2296
-------------------------------------------------------
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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev.rules.devfs patch
2004-01-15 14:23 udev.rules.devfs patch John L. Fjellstad
2004-01-15 14:49 ` Kay Sievers
2004-01-15 15:00 ` Martin Hicks
@ 2004-01-15 15:07 ` Kay Sievers
2004-01-15 21:43 ` Greg KH
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-01-15 15:07 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 15, 2004 at 10:00:55AM -0500, Martin Hicks wrote:
> On Thu, Jan 15, 2004 at 03:49:10PM +0100, Kay Sievers wrote:
> > Greg, I would be happy to remove the ugly %D at all.
> > It's unable to handle cdroms, an the 'dis[ck]'/'partition' thing is easy done by two rules.
> > Then the dis[ck] decision is also up to the user :)
>
> Please don't get rid of %D. I just started using it. The problem that
> I'm dealing with is that the directory where the devfs names are created
> are unpredictable so my callout returns the directory that I'm to create
> the devfs names in and I do something like:
>
> BUS="scsi", CALLOUT="blah", ID="*", NAME="%c/%D", SYMLINK="%c/theAlias"
I don't see your need.
Just use two rules matching with the kernel name, or handle the %D in your script.
And ID= is gone now, in udev v013. We are using RESULT= instead.
I vote for killing the %D :)
Kay
-------------------------------------------------------
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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev.rules.devfs patch
2004-01-15 14:23 udev.rules.devfs patch John L. Fjellstad
` (2 preceding siblings ...)
2004-01-15 15:07 ` Kay Sievers
@ 2004-01-15 21:43 ` Greg KH
3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-01-15 21:43 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 15, 2004 at 04:07:53PM +0100, Kay Sievers wrote:
> On Thu, Jan 15, 2004 at 10:00:55AM -0500, Martin Hicks wrote:
> > On Thu, Jan 15, 2004 at 03:49:10PM +0100, Kay Sievers wrote:
> > > Greg, I would be happy to remove the ugly %D at all.
> > > It's unable to handle cdroms, an the 'dis[ck]'/'partition' thing is easy done by two rules.
> > > Then the dis[ck] decision is also up to the user :)
> >
> > Please don't get rid of %D. I just started using it. The problem that
> > I'm dealing with is that the directory where the devfs names are created
> > are unpredictable so my callout returns the directory that I'm to create
> > the devfs names in and I do something like:
> >
> > BUS="scsi", CALLOUT="blah", ID="*", NAME="%c/%D", SYMLINK="%c/theAlias"
>
> I don't see your need.
> Just use two rules matching with the kernel name, or handle the %D in your script.
> And ID= is gone now, in udev v013. We are using RESULT= instead.
>
> I vote for killing the %D :)
I do to. I'll go remove it now.
Martin, if you _really_ think you still need it, please post your
scripts, and let us determine if there's an easier way to do what you
are wanting to do.
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-01-15 21:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-15 14:23 udev.rules.devfs patch John L. Fjellstad
2004-01-15 14:49 ` Kay Sievers
2004-01-15 15:00 ` Martin Hicks
2004-01-15 15:07 ` Kay Sievers
2004-01-15 21:43 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).