1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-30 01:47:42 +03:00

[PATCH] remove unneeded code, libsysfs does this for us

This commit is contained in:
kay.sievers@vrfy.org 2005-03-14 04:01:54 +01:00 committed by Greg KH
parent fc90ce812d
commit d6d1a18d72

View File

@ -498,21 +498,6 @@ static int compare_sysfs_attribute(struct sysfs_class_device *class_dev, struct
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)
{
@ -622,7 +607,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule,
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;