const char *temp;
int retval;
- if (udev->type != 'b' && udev->type != 'c')
+ if (udev->type != BLOCK && udev->type != CLASS)
return 0;
- retval = udev_db_get_device(udev);
+ retval = udev_db_get_device_by_devpath(udev, udev->devpath);
if (retval) {
/* fall back to kernel name */
temp = strrchr(udev->devpath, '/');