mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
qconfig: Move operation check into parse_args()
Put the check for an operation being provided into the parse_args() function, to reduce the size of main(). Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -1552,7 +1552,13 @@ doc/develop/moveconfig.rst for documentation.'''
|
||||
help='show any build errors as boards are built')
|
||||
parser.add_argument('configs', nargs='*')
|
||||
|
||||
return parser, parser.parse_args()
|
||||
args = parser.parse_args()
|
||||
if not any((args.force_sync, args.build_db, args.imply, args.find,
|
||||
args.scan_source, args.test)):
|
||||
parser.print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
return parser, args
|
||||
|
||||
|
||||
def imply(args):
|
||||
@@ -1660,11 +1666,6 @@ def do_tests():
|
||||
def main():
|
||||
"""Main program"""
|
||||
parser, args = parse_args()
|
||||
if not any((args.force_sync, args.build_db, args.imply, args.find,
|
||||
args.scan_source, args.test)):
|
||||
parser.print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
check_top_directory()
|
||||
|
||||
# prefix the option name with CONFIG_ if missing
|
||||
|
||||
Reference in New Issue
Block a user