From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 02 Dec 2003 00:21:59 +0000 Subject: Re: pattern matching in udev Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, Nov 29, 2003 at 09:58:20PM +0100, Stephane Chauveau wrote: > The current solution is to use CALLOUT but a better way to do it > would be to add some simple pattern matching capabilities to udev. > > For example using the usual * and ? : > > LABEL, BUS="scsi", vendor="ImageMate CF-SM ", ID="*:0:0:0" , NAME="mem0-%n" > LABEL, BUS="scsi", vendor="ImageMate CF-SM ", ID="*:0:0:1" , NAME="mem1-%n" Yes, using '*' in this manner would be nice to have. Care to hack up the strncmp_wildcard() function to achieve this? > Or even better using regular expressions that could be reused to build > the final name: > > REGEXP "<$bus><$vendor><$id>"="<.*:0:0:\(.*\)>", > NAME="mem\1-%n" Ick, if you want to do something like this, CALLOUT to a perl script :) thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ 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