From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephane Chauveau Date: Sat, 29 Nov 2003 20:58:20 +0000 Subject: pattern matching in udev Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hello, did anyone considered the idea of using pattern matching in udev. The current mecanism is nice but it requires an exact match. For example, I have a USB dual memory card reader which produces 2 devices (such as /block/sda and /block/sdb). They have the same characteristics (model, vendor,...). The only difference is their bus 'id' (N:0:0:0 and N:0:0:1 with N a scsi host number). LABEL is useless because the 'keys' are identical and TOPOLOGY is also not what I want because the scsi host are not constant. 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" 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" S. Chauveau ------------------------------------------------------- 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