48af67da26
- udev: path_id - handle Hyper-V devices add: 1008-udev-path_id-handle-Hyper-V-devices.patch - keymap: Update the list of Samsung Series 9 models add: 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch - keymap: Add Samsung 700T add: 1010-keymap-Add-Samsung-700T.patch - libudev: avoid leak during realloc failure add: 1011-libudev-avoid-leak-during-realloc-failure.patch - libudev: do not resolve $attr{device} symlinks add: 1012-libudev-do-not-resolve-attr-device-symlinks.patch - libudev: validate 'udev' argument to udev_enumerate_new() add: 1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch - udev: fix whitespace add: 1014-udev-fix-whitespace.patch - udev: properly handle symlink removal by 'change' event add: 1015-udev-properly-handle-symlink-removal-by-change-event.patch - udev: builtin - do not fail builtin initialization if one of them returns an error add: 1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch - udev: use usec_t and now() add: 1017-udev-use-usec_t-and-now.patch closing an non-existent dbus connection and getting assertion failures. - udev: path_id - handle Hyper-V devices add: 1008-udev-path_id-handle-Hyper-V-devices.patch - keymap: Update the list of Samsung Series 9 models add: 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch - keymap: Add Samsung 700T add: 1010-keymap-Add-Samsung-700T.patch OBS-URL: https://build.opensuse.org/request/show/147673 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=120
41 lines
2.0 KiB
Diff
41 lines
2.0 KiB
Diff
From 5ae18ddc0d86673520c0dd6b59ccac8afc8aa605 Mon Sep 17 00:00:00 2001
|
|
From: Kay Sievers <kay@vrfy.org>
|
|
Date: Tue, 20 Nov 2012 18:07:57 +0100
|
|
Subject: [PATCH] libudev: do not resolve $attr{device} symlinks
|
|
|
|
---
|
|
src/libudev/libudev-device.c | 19 ++++++++++---------
|
|
1 files changed, 10 insertions(+), 9 deletions(-)
|
|
|
|
Index: systemd-195/src/libudev/libudev-device.c
|
|
===================================================================
|
|
--- systemd-195.orig/src/libudev/libudev-device.c
|
|
+++ systemd-195/src/libudev/libudev-device.c
|
|
@@ -1369,16 +1369,17 @@ _public_ const char *udev_device_get_sys
|
|
goto out;
|
|
}
|
|
|
|
- /* resolve link to a device and return its syspath */
|
|
- util_strscpyl(path, sizeof(path), udev_device->syspath, "/", sysattr, NULL);
|
|
- dev = udev_device_new_from_syspath(udev_device->udev, path);
|
|
- if (dev != NULL) {
|
|
- list_entry = udev_list_entry_add(&udev_device->sysattr_value_list, sysattr,
|
|
- udev_device_get_syspath(dev));
|
|
- val = udev_list_entry_get_value(list_entry);
|
|
- udev_device_unref(dev);
|
|
+ /* resolve custom link to a device and return its syspath */
|
|
+ if (!streq(sysattr, "device")) {
|
|
+ util_strscpyl(path, sizeof(path), udev_device->syspath, "/", sysattr, NULL);
|
|
+ dev = udev_device_new_from_syspath(udev_device->udev, path);
|
|
+ if (dev != NULL) {
|
|
+ list_entry = udev_list_entry_add(&udev_device->sysattr_value_list, sysattr,
|
|
+ udev_device_get_syspath(dev));
|
|
+ val = udev_list_entry_get_value(list_entry);
|
|
+ udev_device_unref(dev);
|
|
+ }
|
|
}
|
|
-
|
|
goto out;
|
|
}
|
|
|