Allow to use CONFIG_FOO or just FOO when querying config options in
annotations.
This can help to speed up config update/reviews simply by doing
copy/paste from the console during an updateconfigs when checking values
from master or other kernels doing queries with annotations.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
def do_query(args):
a = Annotation(args.file)
- res = a.search_config(config=args.config, arch=args.arch, flavour=args.flavour)
- print(json.dumps(res, indent=4))
+ for config in (args.config, 'CONFIG_' + args.config if args.config else None):
+ res = a.search_config(config=config, arch=args.arch, flavour=args.flavour)
+ if res:
+ break
+ print(json.dumps({config or '*': res}, indent=4))
def do_note(args):
if args.config is None: