packages/libs/libudev-zero/patches/0012-Revert-udev_enumerate.c-fix-pipeware.patch
Florian Eckert caed72238c libudev-zero: backport latest changes to fix blocking on devices scan
This change added the latest upstream changes since version 1.0.0.

When using the smart plugin from collectd, there are problems with the
function udev_enumerate_scan_devices. This function is blocked and no
longer returns. Backporting the latest fixes from libudev-zero solves
the problem.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-25 03:48:49 +00:00

37 lines
1.2 KiB
Diff

From ec47f63d6b2aeebec25efd64a0788329fdec7d0d Mon Sep 17 00:00:00 2001
From: illiliti <illiliti@protonmail.com>
Date: Tue, 16 Nov 2021 16:17:47 +0300
Subject: [PATCH 12/15] Revert "udev_enumerate.c: fix pipeware"
This reverts commit 4510b27a9b589a0ce82fef776c2648e19e79f2a4.
---
udev_enumerate.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
--- a/udev_enumerate.c
+++ b/udev_enumerate.c
@@ -240,7 +240,7 @@ static int filter_sysattr(struct udev_en
static void *add_device(void *ptr)
{
struct udev_enumerate_thread *thread = ptr;
- struct udev_device *udev_device, *parent;
+ struct udev_device *udev_device;
udev_device = udev_device_new_from_syspath(thread->udev_enumerate->udev, thread->path);
@@ -256,14 +256,7 @@ static void *add_device(void *ptr)
return NULL;
}
- parent = udev_device_get_parent(udev_device);
-
pthread_mutex_lock(thread->mutex);
-
- if (parent) {
- udev_list_entry_add(&thread->udev_enumerate->devices, udev_device_get_syspath(parent), NULL, 0);
- }
-
udev_list_entry_add(&thread->udev_enumerate->devices, udev_device_get_syspath(udev_device), NULL, 0);
pthread_mutex_unlock(thread->mutex);