core/device: Log when we skip device unit creation for symlink

This commit is contained in:
Daan De Meyer
2022-05-08 13:25:42 +02:00
parent e9222bfcfa
commit 2f82874558
+3 -1
View 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);
}