- temp = udevdb_get_udevice_by_sysfs(dev);
- dbg("udevdb_get_udevice_by_sysfs returned %s", temp);
- if (temp != NULL)
- return temp;
-
- temp = strrchr(dev, '/');
+ dev = udevdb_get_dev(path);
+ if (dev != NULL) {
+ strcpy(name, dev->name);
+ goto exit;
+ }
+
+ dbg("%s not found in database, falling back on default name", path);
+ temp = strrchr(path, '/');