@@ -125,27 +125,19 @@ static int
path_discover (vector pathvec, struct config * conf,
struct udev_device *udevice, int flag)
{
- struct path * pp;
- const char * devname;
-
- devname = udev_device_get_sysname(udevice);
- if (!devname)
- return PATHINFO_FAILED;
-
- pp = find_path_by_dev(pathvec, devname);
- if (!pp) {
- char devt[BLK_DEV_SIZE];
- dev_t devnum = udev_device_get_devnum(udevice);
+ struct path *pp;
+ char devt[BLK_DEV_SIZE];
+ dev_t devnum = udev_device_get_devnum(udevice);
- snprintf(devt, BLK_DEV_SIZE, "%d:%d",
- major(devnum), minor(devnum));
- pp = find_path_by_devt(pathvec, devt);
- if (!pp)
- return store_pathinfo(pathvec, conf,
- udevice, flag | DI_BLACKLIST,
- NULL);
- }
- return pathinfo(pp, conf, flag);
+ snprintf(devt, BLK_DEV_SIZE, "%d:%d",
+ major(devnum), minor(devnum));
+ pp = find_path_by_devt(pathvec, devt);
+ if (!pp)
+ return store_pathinfo(pathvec, conf,
+ udevice, flag | DI_BLACKLIST,
+ NULL);
+ else
+ return pathinfo(pp, conf, flag);
}
static void cleanup_udev_enumerate_ptr(void *arg)