summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorpatmans@us.ibm.com <patmans@us.ibm.com>2004-02-12 01:25:28 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:26 -0700
commit3a8c51a771b5c67d5cf0002980254ef175668630 (patch)
tree33063f180356d85f08803272b78d6d2e273d6f68 /namedev.c
parent5a42932b9a783670ae3406fb2c3462036bb16d32 (diff)
[PATCH] udev add wild card compare for ID
Allow wild card comparison of the ID. Using strcmp_pattern here also means we on longer match partial values, for example, a scsi rule like this won't match anymore: BUS="scsi", ID=":0", NAME="sdfoo-short-bus_id-1" But this now works: BUS="scsi", ID="*:0", NAME="sdfoo-bus_id-wild-card-1"
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/namedev.c b/namedev.c
index 59ec08c715..e4e585b5cd 100644
--- a/namedev.c
+++ b/namedev.c
@@ -477,8 +477,9 @@ static int match_id(struct config_device *dev, struct sysfs_class_device *class_
strfieldcpy(path, sysfs_device->path);
temp = strrchr(path, '/');
+ temp++;
dbg("search '%s' in '%s', path='%s'", dev->id, temp, path);
- if (strstr(temp, dev->id) == NULL)
+ if (strcmp_pattern(dev->id, temp) != 0)
return -ENODEV;
else
return 0;