chiark / gitweb /
udev: warn when name_to_handle_at is not implemented
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 20 Apr 2014 17:57:26 +0000 (13:57 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Apr 2014 23:21:51 +0000 (19:21 -0400)
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

src/libudev/libudev-monitor.c

index c05cb3e511bd840146ed67e4fcc4e65f1defc8be..186e5e1e87360e46ce458331138fa9686c7a5db7 100644 (file)
@@ -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);
         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;
                 return false;
+        }
 
         f = fopen("/proc/self/mountinfo", "re");
         if (!f)
 
         f = fopen("/proc/self/mountinfo", "re");
         if (!f)