From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 10 Sep 2004 20:09:07 +0000 Subject: Re: [patch] compatibility symlinks for udev Message-Id: <20040910200907.GA19503@kroah.com> List-Id: References: <1094481997.4727.14.camel@localhost.localdomain> In-Reply-To: <1094481997.4727.14.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Sep 07, 2004 at 01:19:34PM +0200, David Zeuthen wrote: > On Mon, 2004-09-06 at 17:45 +0200, Kay Sievers wrote: > > On Mon, 2004-09-06 at 16:46 +0200, David Zeuthen wrote: > > > > Nice, I like it. It's a easy way to group device nodes of the same type, > > but coming from different kernel subsystems. > > > > That's a good way of putting it, yeah. > > > > Here's a patch against udev-030 that can help create compatibility > > > symlinks like /dev/cdrom, /dev/cdrom1 etc. The patch introduces a new > > > substitution type %C (for Compatibility) that can be used as follows > > > > I suggest using %e for enumeration here, cause "compatibility" can > > easily be misunderstood. > > > > Good point, I've changed that. > > > And we need a few lines added to the man page at udev.8.in :) > > > > Done. I've also added an example. > > Also, Kay pointed out offlist that the rules can be written to not > require a shell script; this actually works > > KERNEL="sr*", NAME="%k", SYMLINK="cdrom%e" > KERNEL="scd*", NAME="%k", SYMLINK="cdrom%e" > KERNEL="pcd*", NAME="%k", SYMLINK="cdrom%e" > KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="\%k", SYMLINK="cdrom%e" > KERNEL="fd[0-9]", NAME="%k", SYMLINK="floppy%e" > KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy", NAME=\"%k", SYMLINK="floppy%e" > > New patch is attached. Nice, I've applied this. How about sending a patch for the test/udev-test.pl script that adds a test for this new paramater, so we make sure to not break it in the future. thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ 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