- /* remove sysfs_path if given */
- if (strncmp(path, sysfs_path, strlen(sysfs_path)) == 0) {
- pos = path + strlen(sysfs_path);
- } else {
- if (path[0] != '/') {
- /* prepend '/' if missing */
- strcpy(temp, "/");
- strlcpy(temp, path, sizeof(temp));
- pos = temp;
- } else {
- pos = path;
- }
- }
- if (udev_db_get_device(udev, pos) != 0) {
- fprintf(stderr, "no record for '%s' in database\n", pos);
+ if (udev_db_get_device(udev, path) != 0) {
+ fprintf(stderr, "no record for '%s' in database\n", path);