SHA256
1
0
forked from pool/systemd
systemd/1064-udev-hwdb-do-not-look-at-usb_device-parents.patch
Stephan Kulow 77593c6f2f Accepting request 246717 from Base:System
- Add upstream patches
  0001-login-fix-memory-leak-on-DropController.patch
  0002-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch
  0003-sd-journal-properly-convert-object-size-on-big-endia.patch
  0004-sd-journal-verify-that-object-start-with-the-field-n.patch
- Add upstream patch
  1064-udev-hwdb-do-not-look-at-usb_device-parents.patch
  to avoid that hwdb ID's for unrecognised USB device are taken
  from the USB hub.

- Add upstream patches
  0001-systemctl-Correct-error-message-printed-when-bus_pro.patch
  0002-units-order-systemd-fsck-.service-after-local-fs-pre.patch
  0003-keymap-Adjust-for-more-Samsung-900X4-series.patch

- Add patch use-rndaddentropy-ioctl-to-load-random-seed.patch to
  use RNDADDENTROPY ioctl to load random-seed and to increase
  entropy count as well (bnc#892096)

- Add upstream patches
  0001-login-fix-memory-leak-on-DropController.patch
  0002-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch
  0003-sd-journal-properly-convert-object-size-on-big-endia.patch
  0004-sd-journal-verify-that-object-start-with-the-field-n.patch
- Add upstream patch
  1064-udev-hwdb-do-not-look-at-usb_device-parents.patch
  to avoid that hwdb ID's for unrecognised USB device are taken
  from the USB hub.

- Add upstream patches

OBS-URL: https://build.opensuse.org/request/show/246717
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=202
2014-08-29 15:43:00 +00:00

64 lines
2.4 KiB
Diff

From 77cf759ea05bea476cdcb8d0dcd04c4e6fb3b2ff Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Tue, 26 Aug 2014 18:27:36 +0200
Subject: [PATCH] udev: hwdb - do not look at "usb_device" parents
Based on a patch from Simon McVittie <simon.mcvittie@collabora.co.uk>.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758050
---
src/udev/udev-builtin-hwdb.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git src/udev/udev-builtin-hwdb.c src/udev/udev-builtin-hwdb.c
index cac97e7..695a31a 100644
--- src/udev/udev-builtin-hwdb.c
+++ src/udev/udev-builtin-hwdb.c
@@ -88,9 +88,10 @@ static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device
const char *filter, bool test) {
struct udev_device *d;
char s[16];
- int n = 0;
+ bool last = false;
+ int r = 0;
- for (d = srcdev; d; d = udev_device_get_parent(d)) {
+ for (d = srcdev; d && !last; d = udev_device_get_parent(d)) {
const char *dsubsys;
const char *modalias = NULL;
@@ -104,19 +105,24 @@ static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device
modalias = udev_device_get_property_value(d, "MODALIAS");
- /* the usb_device does not have a modalias, compose one */
- if (!modalias && streq(dsubsys, "usb"))
- modalias = modalias_usb(d, s, sizeof(s));
+ if (streq(dsubsys, "usb") && streq_ptr(udev_device_get_devtype(d), "usb_device")) {
+ /* if the usb_device does not have a modalias, compose one */
+ if (!modalias)
+ modalias = modalias_usb(d, s, sizeof(s));
+
+ /* avoid looking at any parent device, they are usually just a USB hub */
+ last = true;
+ }
if (!modalias)
continue;
- n = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test);
- if (n > 0)
+ r = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test);
+ if (r > 0)
break;
}
- return n;
+ return r;
}
static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool test) {
--
1.7.9.2