From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 06 Sep 2004 15:45:50 +0000 Subject: Re: [patch] compatibility symlinks for udev Message-Id: <1094485551.3319.42.camel@localhost.localdomain> 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 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. > 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. > Together with a simple helper script (that can be removed as soon as IDE > exports the type in sysfs; alternatively this is trivial to write in C > for e.g. early boot) > > #!/bin/sh > TYPE=`cat /proc/ide/$1/media` > if test "$TYPE" = "cdrom"; then > echo -n cdrom > exit 0 > elif test "$TYPE" = "floppy"; then > echo -n floppy > exit 0 > fi > exit 1 I will look into it, if it's easy to add to sysfs. And we need a few lines added to the man page at udev.8.in :) Thanks, Kay ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ 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