summaryrefslogtreecommitdiff
path: root/udev_rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-08-24 09:03:15 +0200
committerKay Sievers <kay.sievers@suse.de>2006-08-24 09:03:15 +0200
commitcea61f5c0303d7e2f0886688e789c091d7e4b9e2 (patch)
treefb2ac17552f7f48d595270facc0ea7381a068029 /udev_rules.c
parent34bb5d057c99fa433392e0d5c17f604c8c111381 (diff)
use fnmatch() instead of our own pattern match code
Diffstat (limited to 'udev_rules.c')
-rw-r--r--udev_rules.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/udev_rules.c b/udev_rules.c
index d9e1d89e6c..267c79de03 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <errno.h>
#include <syslog.h>
+#include <fnmatch.h>
#include <sys/wait.h>
#include <sys/stat.h>
@@ -246,7 +247,7 @@ static int import_parent_into_env(struct udevice *udev, const char *filter)
if (pos) {
pos[0] = '\0';
pos++;
- if (strcmp_pattern(filter, name) == 0) {
+ if (fnmatch(filter, name, 0) == 0) {
dbg("import key '%s'", name_loop->name);
name_list_add(&udev->env_list, name_loop->name, 0);
setenv(name, pos, 1);
@@ -583,7 +584,7 @@ static int match_key(const char *key_name, struct udev_rule *rule, struct key *k
pos++;
}
dbg("match %s '%s' <-> '%s'", key_name, key_value, val);
- match = (strcmp_pattern(key_value, val) == 0);
+ match = (fnmatch(key_value, val, 0) == 0);
if (match && (key->operation != KEY_OP_NOMATCH)) {
dbg("%s is true (matching value)", key_name);
return 0;