Files
qemu/scripts
Paolo Bonzini e07ed5548e minikconf: move command-line assignment out of the parser
KconfigParser.do_assignment() only exists to handle CONFIG_FOO=y/n
arguments from the command line; it is never invoked while parsing
a Kconfig source file.  Because main() called it on a parser that
had never been through parse_file(), a failing CONFIG_ check would
raise a KconfigParserError whose __init__ and location() touch
fields of "self" that do not exist yet.  The regex in main()
currently shields this, but it is fragile.

Move the prefix-stripping assignment to KconfigData as
do_cmdline_assignment(), simplify KconfigParser.parse() to accept
an existing KconfigData, and call it from main() so the parser is
only used for actual file parsing.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-04-30 15:50:18 +02:00
..
2025-12-27 10:11:10 +01:00
2025-12-27 10:11:10 +01:00