- if (strcmp(dev->name, new_dev->name) == 0) {
- /* the same, copy the new info into this structure */
- copy_var(dev, new_dev, type);
- copy_var(dev, new_dev, mode);
- copy_string(dev, new_dev, bus);
- copy_string(dev, new_dev, sysfs_file);
- copy_string(dev, new_dev, sysfs_value);
- copy_string(dev, new_dev, id);
- copy_string(dev, new_dev, place);
- copy_string(dev, new_dev, kernel_name);
- copy_string(dev, new_dev, owner);
- copy_string(dev, new_dev, group);
- return 0;
+ int len = strlen(new_dev->name);
+ if (new_dev->name[len-1] == '*') {
+ len--;
+ if (strncmp(dev->name, new_dev->name, len))
+ continue;
+ } else {
+ if (strcmp(dev->name, new_dev->name))
+ continue;