Skip to contentSkip to conversation

pattern matching in udev

DISCUSSION Stephane Chauveau 2 participants 2 messages Dec 3, 2003 – Dec 4, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines
Quoted 2 lines

REGEXP "<$bus><$vendor><$id>"="<scsi><ImageMate.*><.*:0:0:\(.*\)>",

             NAME="mem\1-%n"

IMO the pattern matching should be part of the TOPOLOGY plus PLACE.

The scsi naming also requires a parent, your example above is only valid if you have one host adapter connected (or one usb mass storage device attached), there could exist another sd on *:0:0:0.

Not really because my example matches the $bus, the $id and the $vendor. A single method capable of pattern matching on all the available informations could be used to replace all the methods currently in implemented in udev (except maybe REPLACE which has a different purpose).

Stephane.

-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 10 lines · Stephane Chauveau
Quoted 8 lines
Quoted 2 lines

REGEXP "<$bus><$vendor><$id>"="<scsi><ImageMate.*><.*:0:0:\(.*\)>",

             NAME="mem\1-%n"

IMO the pattern matching should be part of the TOPOLOGY plus PLACE.

The scsi naming also requires a parent, your example above is only valid if you have one host adapter connected (or one usb mass storage device attached), there could exist another sd on *:0:0:0.

Not really because my example matches the $bus, the $id and the $vendor.

There could be another identical scsi device with the same id and vendor.

I thought the PCI sysfs id's were constant for a given hardware, but I'm told they can change with PCI hotplug, so the full sysfs path I mentioned previously will not be constant across boots with PCI hotplugging.

Quoted 3 lines

A single method capable of pattern matching on all the available informations could be used to replace all the methods currently in implemented in udev (except maybe REPLACE which has a different purpose).

-- Patrick Mansfield

-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel