From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Svetoslav Slavtchev" Date: Sat, 13 Dec 2003 00:39:24 +0000 Subject: Re: udev.rules.devfs + symlinks & a question Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org > On Thu, Dec 11, 2003 at 02:31:34AM +0100, Svetoslav Slavtchev wrote: > > on second thought, i think you missunderstood me >=20 > I don't really understand your example. Can you give me a real example > using udev rules? >=20 NUMBER, BUS=3D"ide", id=3D"0.0", type=3D"disk" \ NAME=3D"ide/host0/bus0/target0/lun0/%D", SYMLINK=3D"hda%n" NUMBER, BUS=3D"ide", id=3D"0.1", type=3D"disk" \ NAME=3D"ide/host0/bus0/target1/lun0/%D", SYMLINK=3D"hdb%n" NUMBER, BUS=3D"ide", id=3D"1.0", type=3D"disk" \ NAME=3D"ide/host0/bus1/target0/lun0/%D", SYMLINK=3D"hdc%n" NUMBER, BUS=3D"ide", id=3D"1.1", type=3D"disk" \ NAME=3D"ide/host0/bus1/target1/lun0/%D", SYMLINK=3D"hdd%n" NUMBER, BUS=3D"ide", id=3D"0.0", type=3D"cd" \ NAME=3D"ide/host0/bus0/target0/lun0/cd", SYMLINK=3D"hda" NUMBER, BUS=3D"ide", id=3D"0.1", type=3D"cd" \ NAME=3D"ide/host0/bus0/target1/lun0/cd", SYMLINK=3D"hdb" NUMBER, BUS=3D"ide", id=3D"1.0", type=3D"cd" \ NAME=3D"ide/host0/bus1/target0/lun0/cd", SYMLINK=3D"hdc" NUMBER, BUS=3D"ide", id=3D"1.1", type=3D"cd" \ NAME=3D"ide/host0/bus1/target1/lun0/cd", SYMLINK=3D"hdd" i think this should theoretically work if ide exported the needed information, and may be it works now on scsi, but there is one small issue there is no way to export smth similar to devfs=20 smth like we have to variables=20 int cd=3D0, disk=3D0 and use for the symlink rules : NUMBER, BUS=3D"ide", id=3D"0.0", type=3D"disk" \ NAME=3D"ide/host0/bus0/target0/lun0/%D", \ SYMLINK=3D"hda%n discs/disc%disc++" NUMBER, BUS=3D"ide", id=3D"0.1", type=3D"disk" \ NAME=3D"ide/host0/bus0/target1/lun0/%D", \ SYMLINK=3D"hdb%n discs/disc%disc++" NUMBER, BUS=3D"ide", id=3D"1.0", type=3D"disk" \ NAME=3D"ide/host0/bus1/target0/lun0/%D", \ SYMLINK=3D"hdc%n discs/disc%disc++" NUMBER, BUS=3D"ide", id=3D"1.1", type=3D"disk" \ NAME=3D"ide/host0/bus1/target1/lun0/%D", \ SYMLINK=3D"hdd%n discs/disc%disc++" NUMBER, BUS=3D"ide", id=3D"0.0", type=3D"cd" \ NAME=3D"ide/host0/bus0/target0/lun0/cd", \ SYMLINK=3D"hda cdrom%cd++" NUMBER, BUS=3D"ide", id=3D"0.1", type=3D"cd" \ NAME=3D"ide/host0/bus0/target1/lun0/cd", \ SYMLINK=3D"hdb cdrom%cd++" NUMBER, BUS=3D"ide", id=3D"1.0", type=3D"cd" \ NAME=3D"ide/host0/bus1/target0/lun0/cd", \ SYMLINK=3D"hdc cdrom%cd++" NUMBER, BUS=3D"ide", id=3D"1.1", type=3D"cd" \ NAME=3D"ide/host0/bus1/target1/lun0/cd", \ SYMLINK=3D"hdd cdrom%cd++" so this should create the standard devfs files (NAME) and symlinks named acording to the order of=20 registering/ finding the devices :( i think i'm getting confused from my explanations :( i'm getting really confused :( may be a better idea would be to use the REPLACE i've for alsa REPLACE, KERNEL=3D"admmidi", NAME=3D"sound/admmidi", SYMLINK=3D"admmidi" REPLACE, KERNEL=3D"admmidi[1-9]", NAME=3D"sound/admmidi%n", SYMLINK=3D"admm= idi%n" and a devfs like implementation for cd's would be REPLACE, KERNEL=3D"cdrom", NAME=3D"%D", SYMLINK=3D"cdroms/cdrom cdrom" REPLACE, KERNEL=3D"cdrom[1-9]*", NAME=3D"%D", SYMLINK=3D"cdroms/cdrom&n cdr= om%n" where %D should construct the full name like in NAME=3D"ide/host0/bus1/target0/lun0/cd according to id=3D"x:x" forget it, i think i just confused you more :( best, svetljo --=20 +++ GMX - die erste Adresse f=FCr Mail, Message, More +++ Neu: Preissenkung f=FCr MMS und FreeMMS! http://www.gmx.net ------------------------------------------------------- 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_id=1278&alloc_id371&op=3Dclick _______________________________________________ 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