summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-02-08 11:49:45 -0700
committerSimon Glass <sjg@chromium.org>2022-02-22 10:05:44 -0700
commitb8d11da0d09aed23c880e572144148d8c9d4cd64 (patch)
tree1052552b05d8710ead0ab42f9cd92b704512a4f7 /tools
parent8db1f9958ff7dfc54ef673607d47694dd672dae7 (diff)
moveconfig: Show the config name rather than the defconfig
The _defconfig suffix is unnecessary when showing matching boards. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/moveconfig.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 1bcf58caf1..5ef5a95eb6 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -91,7 +91,20 @@ SIZES = {
'SZ_4G': 0x100000000
}
+RE_REMOVE_DEFCONFIG = re.compile(r'(.*)_defconfig')
+
### helper functions ###
+def remove_defconfig(defc):
+ """Drop the _defconfig suffix on a string
+
+ Args:
+ defc (str): String to convert
+
+ Returns:
+ str: string with the '_defconfig' suffix removed
+ """
+ return RE_REMOVE_DEFCONFIG.match(defc)[1]
+
def check_top_directory():
"""Exit if we are not at the top of source directory."""
for fname in 'README', 'Licenses':
@@ -1638,7 +1651,7 @@ def do_find_config(config_list):
print(f"Error: Not in Kconfig: %s" % ' '.join(adhoc))
else:
print(f'{len(out)} matches')
- print(' '.join(out))
+ print(' '.join([remove_defconfig(item) for item in out]))
def prefix_config(cfg):