mdev: reinstate "follow symlinks" flag, this time with explanation
This commit is contained in:
parent
58f59a25ee
commit
67075bb95f
@ -420,14 +420,17 @@ int mdev_main(int argc, char **argv)
|
|||||||
root_major = major(st.st_dev);
|
root_major = major(st.st_dev);
|
||||||
root_minor = minor(st.st_dev);
|
root_minor = minor(st.st_dev);
|
||||||
|
|
||||||
|
/* ACTION_FOLLOWLINKS is needed since in newer kernels
|
||||||
|
* /sys/block/loop* (for example) are symlinks to dirs,
|
||||||
|
* not real directories.
|
||||||
|
* (kernel's CONFIG_SYSFS_DEPRECATED makes them real dirs,
|
||||||
|
* but we can't enforce that on users) */
|
||||||
recursive_action("/sys/block",
|
recursive_action("/sys/block",
|
||||||
ACTION_RECURSE /* no ACTION_FOLLOWLINKS! */,
|
ACTION_RECURSE | ACTION_FOLLOWLINKS,
|
||||||
fileAction, dirAction, temp, 0);
|
fileAction, dirAction, temp, 0);
|
||||||
|
|
||||||
recursive_action("/sys/class",
|
recursive_action("/sys/class",
|
||||||
ACTION_RECURSE /* no ACTION_FOLLOWLINKS! */,
|
ACTION_RECURSE | ACTION_FOLLOWLINKS,
|
||||||
fileAction, dirAction, temp, 0);
|
fileAction, dirAction, temp, 0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Hotplug:
|
/* Hotplug:
|
||||||
* env ACTION=... DEVPATH=... mdev
|
* env ACTION=... DEVPATH=... mdev
|
||||||
|
Loading…
Reference in New Issue
Block a user