diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-12-15 16:14:14 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-12-15 16:14:14 +0100 |
commit | 3c1898863fbf9c94cfb0258ae380b67b44c4b466 (patch) | |
tree | f5671df4da5de8c33ddb55dd554383ad73151270 /libudev/libudev-device.c | |
parent | ac9b4baac52d8713512629272384124fa1d01b23 (diff) |
remove remaining support for CONFIG_SYSFS_DEPRECATED
Diffstat (limited to 'libudev/libudev-device.c')
-rw-r--r-- | libudev/libudev-device.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c index add1c99ec0..dffeed0b79 100644 --- a/libudev/libudev-device.c +++ b/libudev/libudev-device.c @@ -508,20 +508,9 @@ static struct udev_device *device_new_from_parent(struct udev_device *udev_devic char path[UTIL_PATH_SIZE]; const char *subdir; - /* follow "device" link in deprecated sys layout */ - if (strncmp(udev_device->devpath, "/class/", 7) == 0 || - strncmp(udev_device->devpath, "/block/", 7) == 0) { - util_strscpyl(path, sizeof(path), udev_device->syspath, "/device", NULL); - if (util_resolve_sys_link(udev_device->udev, path, sizeof(path)) == 0) { - udev_device_parent = udev_device_new_from_syspath(udev_device->udev, path); - if (udev_device_parent != NULL) - return udev_device_parent; - } - } - util_strscpy(path, sizeof(path), udev_device->syspath); subdir = &path[strlen(udev_get_sys_path(udev_device->udev))+1]; - while (1) { + for (;;) { char *pos; pos = strrchr(subdir, '/'); |