[PATCH] fix MODALIAS syntax in udev rules

Colin Watson cjwatson at ubuntu.com
Wed Nov 23 06:51:43 EST 2005


The following patch updates pcmciautils to take account of the following
comment in udev 064's RELEASE-NOTES:

  The test for the existence of an environment value should be
  switched from:
    ENV{KEY}=="*" to ENV{KEY}=="?*"
  cause "*" will not fail anymore, if the key does not exist or
  is empty.

It should still work with older versions of udev.

--- udev/60-pcmcia.rules
+++ udev/60-pcmcia.rules
@@ -4,12 +4,12 @@
 # are so broken that we need to read out random bytes of it
 # instead of the manufactor, card or product ID. Then the
 # matching is done in userspace.
-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \
+ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="?*", \
 		RUN+="/lib/udev/pcmcia-check-broken-cis"
 
 # However, the "weak" matching by func_id is only allowed _after_ modprobe
 # returns, so that "strong" matches have a higher priority.
-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \
+ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="?*", \
 		RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"
 
 

--- udev/60-pcmcia.rules.static
+++ udev/60-pcmcia.rules.static
@@ -4,12 +4,12 @@
 # are so broken that we need to read out random bytes of it
 # instead of the manufactor, card or product ID. Then the
 # matching is done in userspace.
-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \
+ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="?*", \
 		RUN+="/lib/udev/pcmcia-check-broken-cis"
 
 # However, the "weak" matching by func_id is only allowed _after_ modprobe
 # returns, so that "strong" matches have a higher priority.
-ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \
+ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="?*", \
 		RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"
 
 

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the linux-pcmcia mailing list