]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/device: Log when we skip device unit creation for symlink
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 7 May 2022 13:53:52 +0000 (15:53 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 8 May 2022 11:25:42 +0000 (13:25 +0200)
src/core/device.c

index 1c7dde2f2264032aa636d60a6409dd8b4622f02b..158a61b49c5482137b67818c3c7a9404e6c41510 100644 (file)
@@ -588,8 +588,10 @@ static void device_process_new(Manager *m, sd_device *dev, const char *sysfs) {
                          * node major/minor */
                         if (stat(p, &st) >= 0 &&
                             ((!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) ||
-                             st.st_rdev != devnum))
+                             st.st_rdev != devnum)) {
+                                log_device_debug(dev, "Skipping device unit creation for symlink %s not owned by device", p);
                                 continue;
+                        }
 
                         (void) device_setup_unit(m, dev, p, false);
                 }