-/**
- * udevdb_dump: dumps whole database by passing record data to user function
- * @user_record_handler: user function called for every record in the database
- */
-int udevdb_dump(void (*user_record_handler) (char *path, struct udevice *dev))
-{
- if (user_record_handler == NULL) {
- dbg("invalid user record handling function");
- return -EINVAL;
+ 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;
+ }
+
+ }