mirror of
https://xff.cz/git/u-boot/
synced 2025-09-18 09:02:25 +02:00
dtoc: Ignore unwanted files when scanning for drivers
We should ignore anything in the .git directory or any of the build-sandbox, etc. directories created by 'make check'. These can confuse dtoc. Update the code to ignore these. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -345,6 +345,11 @@ class Scanner:
|
||||
This procedure will populate self._drivers and self._driver_aliases
|
||||
"""
|
||||
for (dirpath, _, filenames) in os.walk(self._basedir):
|
||||
rel_path = dirpath[len(self._basedir):]
|
||||
if rel_path.startswith('/'):
|
||||
rel_path = rel_path[1:]
|
||||
if rel_path.startswith('build') or rel_path.startswith('.git'):
|
||||
continue
|
||||
for fname in filenames:
|
||||
if not fname.endswith('.c'):
|
||||
continue
|
||||
|
Reference in New Issue
Block a user