aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass2024-07-17 16:57:02 +0100
committerSimon Glass2024-07-26 08:01:06 -0600
commitd63357eefc16ad53216950956675d6b1099ea7e7 (patch)
tree18d5fb672cb7e07857c2cadee7826b3c62c4152a
parent7e68804fa39a018d7cd5b9245ec6610d8ae6b4d7 (diff)
qconfig: Add a return value to do_scan_source()
Return an exit code so we can use this function like do_tests(). Refactor the caller to handle this. Reduce the size of main() by putting this code into its own function. Signed-off-by: Simon Glass <sjg@chromium.org>
-rwxr-xr-xtools/qconfig.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/qconfig.py b/tools/qconfig.py
index 0bdabccba07..4365d8d75db 100755
--- a/tools/qconfig.py
+++ b/tools/qconfig.py
@@ -1451,6 +1451,7 @@ def do_scan_source(path, do_update):
file=out)
for item in sorted(proper_not_found):
print(item, file=out)
+ return 0
def parse_args():
@@ -1546,10 +1547,8 @@ def main():
if args.test:
return do_tests()
-
if args.scan_source:
- do_scan_source(os.getcwd(), args.update)
- return 0
+ return do_scan_source(os.getcwd(), args.update)
if args.imply:
imply_flags = 0