Skip to content

udev: avoid [0-9]* as shell globbing patterns

The udev rules expect matches based on shell globbing pattern, not based on regex. This means that "[0-9]*" doesn't mean "zero or more digits", it actually means "one digit and zero or more other characters".

So, avoid the regex like match, even if it worked for us, because it didn't mean what we thought it meant, plus, it breaks our custom udev rules processing logic, in which we convert the input patterns into real regex expressions.

See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916

While at it, also make sure that the wildcard matching is done exclusively for prefix and suffix matches, never in the middle of a string, or our custom rules parser would not match correctly.

Edited by Aleksander Morgado

Merge request reports