--- lib/sysfs_device.c.old 2006-08-07 07:08:01.000000000 +0200 +++ lib/sysfs_device.c.old 2008-05-07 21:35:55.000000000 +0200 @@ -170,10 +170,6 @@ errno = EINVAL; return NULL; } - if (sysfs_path_is_dir(path)) { - dprintf("Incorrect path to device: %s\n", path); - return NULL; - } dev = alloc_device(); if (!dev) { dprintf("Error allocating device at %s\n", path); @@ -197,9 +193,7 @@ * implies that the dev->name and dev->bus_id contain same data. */ safestrcpy(dev->name, dev->bus_id); - - if (sysfs_get_device_bus(dev)) - dprintf("Could not get device bus\n"); + safestrcpy(dev->bus, dev->bus_id); if (get_dev_driver(dev)) { dprintf("Could not get device %s's driver\n", dev->bus_id);