- memcpy(find_dev, dev, sizeof(struct udevice));
- strfieldcpymax(find_path, path, NAME_SIZE);
- find_found = 1;
- return 1;
+ snprintf(filename, NAME_SIZE-1, "%s/%s", udev_db_path, ent->d_name);
+ filename[NAME_SIZE-1] = '\0';
+
+ memset(&db_udev, 0x00, sizeof(struct udevice));
+ if (parse_db_file(&db_udev, filename) == 0) {
+ char *pos;
+ int len;
+
+ if (strncmp(name, db_udev.name, NAME_SIZE) == 0) {
+ goto found;
+ }
+
+ foreach_strpart(db_udev.symlink, " ", pos, len) {
+ if (strncmp(name, pos, len) != 0)
+ continue;
+
+ if (len == strlen(name))
+ goto found;
+ }
+
+ }