summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-20 13:57:26 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-04-26 14:10:21 -0400
commit8e22a811415a37a191e1795e7d6c470463264593 (patch)
tree78d1dfd3d0e4e6821e094640ed7f1dd7a30a4f68 /src
parent56127c00c37485fc2c66c9e442701726139e3438 (diff)
udev: warn when name_to_handle_at is not implemented
We have a bunch of reports from people who have a custom kernel and are confused why udev is not running. Issue a warning on error. Barring an error in the code, the only error that is possible is ENOSYS. https://bugzilla.redhat.com/show_bug.cgi?id=1072966
Diffstat (limited to 'src')
-rw-r--r--src/libudev/libudev-monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 4319ee01c2..4476c1d17e 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -119,8 +119,11 @@ static bool udev_has_devtmpfs(struct udev *udev) {
int r;
r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
- if (r < 0)
+ if (r < 0) {
+ if (errno != EOPNOTSUPP)
+ udev_err(udev, "name_to_handle_at on /dev: %m\n");
return false;
+ }
f = fopen("/proc/self/mountinfo", "re");
if (!f)