]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
qconfig: Add a return value to do_scan_source()
authorSimon Glass <sjg@chromium.org>
Wed, 17 Jul 2024 15:57:02 +0000 (16:57 +0100)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Jul 2024 14:01:06 +0000 (08:01 -0600)
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>
tools/qconfig.py

index 0bdabccba073e8997efd3f93ab3a27fa71af0fe1..4365d8d75db316644ba1b62409d42fd03a1eeaab 100755 (executable)
@@ -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