diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2003-12-02 17:52:26 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:13:05 -0700 |
commit | 0db6d4cc61523ee7f3f627f807c01f86ee2d36ab (patch) | |
tree | cfe68f7e66bbc143b35bc6b822e5c6ff605f1a78 /namedev.c | |
parent | 8cf7ebe8cdf9cb39ca9a60e23c735ab62cd15928 (diff) |
[PATCH] catch replace device by wildcard
catch device name by wildcard to support a whole class of devices
by just one config line like:
REPLACE, KERNEL="tty*", NAME="vc/%n"
Diffstat (limited to 'namedev.c')
-rw-r--r-- | namedev.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -860,8 +860,8 @@ static int do_replace(struct sysfs_class_device *class_dev, struct udevice *udev continue; dbg_parse("compare name '%s' with '%s'", - dev->kernel_name, dev->name); - if (strcmp(dev->kernel_name, class_dev->name) != 0) + dev->kernel_name, class_dev->name); + if (strncmp_wildcard(class_dev->name, dev->kernel_name, NAME_SIZE) != 0) continue; strfieldcpy(udev->name, dev->name); |