8f51593cdc
The iglob function, which we use to find C source files in the kernel
tree, always follows symbolic links. This can cause unintentional
recursions whenever a symbolic link points to a parent directory. A
common scenario is building the kernel with the output set to a
directory inside the kernel tree, which will contain such a symlink.
Instead of using the iglob function, use os.walk to traverse the
directory tree, which by default doesn't follow symbolic links. fnmatch
is then used to match the glob on the filename, as well as ignore hidden
files (which were ignored by default with iglob).
This approach runs just as fast as using iglob.
Fixes:
|
||
---|---|---|
.. | ||
include-prefixes | ||
libfdt | ||
.gitignore | ||
Makefile | ||
checks.c | ||
data.c | ||
dt-extract-compatibles | ||
dt_to_config | ||
dtc-lexer.l | ||
dtc-parser.y | ||
dtc.c | ||
dtc.h | ||
dtx_diff | ||
fdtget.c | ||
fdtoverlay.c | ||
fdtput.c | ||
flattree.c | ||
fstree.c | ||
livetree.c | ||
of_unittest_expect | ||
srcpos.c | ||
srcpos.h | ||
treesource.c | ||
update-dtc-source.sh | ||
util.c | ||
util.h | ||
version_gen.h | ||
yamltree.c |