chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fc90ce8
)
[PATCH] remove unneeded code, libsysfs does this for us
author
kay.sievers@vrfy.org
<kay.sievers@vrfy.org>
Mon, 14 Mar 2005 03:01:54 +0000
(
04:01
+0100)
committer
Greg KH
<gregkh@suse.de>
Wed, 27 Apr 2005 06:53:18 +0000
(23:53 -0700)
udev_rules.c
patch
|
blob
|
history
diff --git
a/udev_rules.c
b/udev_rules.c
index 551c06131b43843d1ee4bf69f69c9736d169e500..f09d6d47bfbdc8a0b0e1e238283a445c619c0dfc 100644
(file)
--- a/
udev_rules.c
+++ b/
udev_rules.c
@@
-498,21
+498,6
@@
static int compare_sysfs_attribute(struct sysfs_class_device *class_dev, struct
return 0;
}
return 0;
}
-static int match_id(struct udev_rule *rule, struct sysfs_device *sysfs_device)
-{
- char path[PATH_SIZE];
- char *temp;
-
- strlcpy(path, sysfs_device->path, sizeof(path));
- temp = strrchr(path, '/');
- temp++;
- dbg("search '%s' in '%s', path='%s'", rule->id, temp, path);
- if (strcmp_pattern(rule->id, temp) != 0)
- return -ENODEV;
-
- return 0;
-}
-
static int match_rule(struct udevice *udev, struct udev_rule *rule,
struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device)
{
static int match_rule(struct udevice *udev, struct udev_rule *rule,
struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device)
{
@@
-622,7
+607,7
@@
static int match_rule(struct udevice *udev, struct udev_rule *rule,
goto try_parent;
}
dbg("check " KEY_ID);
goto try_parent;
}
dbg("check " KEY_ID);
- if (
match_id(rule, sysfs_device
) != 0) {
+ if (
strcmp_pattern(rule->id, sysfs_device->bus_id
) != 0) {
dbg(KEY_ID " is not matching");
if (rule->id_operation != KEY_OP_NOMATCH)
goto try_parent;
dbg(KEY_ID " is not matching");
if (rule->id_operation != KEY_OP_NOMATCH)
goto try_parent;