Skip to contentSkip to conversation

package/eudev: Fix monitor starting

PATCH New Joel Stanley 2 participants 3 messages Feb 10, 2020 – Mar 13, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/eudev: Fix monitor starting

When the kernel has CONFIG_SHMEM disabled /dev is a ramfs (instead of a tmpfs) and the name_to_handle_at system call is not supported. This causes eudev's monitor application to exit on startup.

Upstream eudev has added this fix which is not yet part of a release.

---
 ...dev-monitor.c-do-not-check-if-dev-is.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/eudev/0001-src-libudev-libudev-monitor.c-do-not-check-if-dev-is.patch
package/eudev/0001-src-libudev-libudev-monitor.c-do-not-check-if-dev-is.patch new file +33 -0
new file mode 100644
index 000000000000..3027ad7f17b7
@@ -0,0 +1,33 @@
+From 799591c57368bbe47667f5b696050247a766b117 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <[email protected]>
+Date: Mon, 6 Jan 2020 11:14:47 -0500
+Subject: [PATCH] src/libudev/libudev-monitor.c: do not check if /dev is tmpfs
+
+This check fails for buildroot systems where /dev is not mounted
+as a tmpfs filesystem.  Dropping this check should be safe even
+on regular systems.
+
+This solves issue #172.
+
+Signed-off-by: Anthony G. Basile <[email protected]>
+Signed-off-by: Joel Stanley <[email protected]>
+---
+ src/libudev/libudev-monitor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
+index 614149c6243c..060ba733f33b 100644
+--- a/src/libudev/libudev-monitor.c
++++ b/src/libudev/libudev-monitor.c
+@@ -186,7 +186,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
+                  * We do not set a netlink multicast group here, so the socket
+                  * will not receive any messages.
+                  */
+-                if (access(UDEV_ROOT_RUN "/udev/control", F_OK) < 0 || !udev_has_devtmpfs(udev)) {
++                if (access(UDEV_ROOT_RUN "/udev/control", F_OK) < 0) {
+                         log_debug("the udev service seems not to be active, disable the monitor");
+                         group = UDEV_MONITOR_NONE;
+                 } else
+-- 
+2.25.0
+
Signature · 1 line
2.25.0
#1 lore raw

PATCH 1/1 package/eudev: Fix monitor starting

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joel" == Joel Stanley <[email protected]> writes:

Hi,

Quoted 7 lines

When the kernel has CONFIG_SHMEM disabled /dev is a ramfs (instead of a tmpfs) and the name_to_handle_at system call is not supported. This causes eudev's monitor application to exit on startup.

Upstream eudev has added this fix which is not yet part of a release.

Extended the subject with to say '.. Fix monitor starting for kernels w/o CONFIG_SHMEM' and committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 package/eudev: Fix monitor starting

In reply to Joel Stanley
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joel" == Joel Stanley <[email protected]> writes:

When the kernel has CONFIG_SHMEM disabled /dev is a ramfs (instead of a tmpfs) and the name_to_handle_at system call is not supported. This causes eudev's monitor application to exit on startup.

Upstream eudev has added this fix which is not yet part of a release.

Committed to 2019.02.x and 2019.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard