acrn-config: refine board name with undline_name api

Sometimes character '-' or space need to be converted to '_' to make string format uniformed.
Add this common api to satisfy such requirment and refine the code for board name generating.

Tracked-On: #3852
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu
2019-10-17 10:23:56 +08:00
committed by wenlingz
parent 95b9ba36b0
commit a2430f1313
6 changed files with 43 additions and 38 deletions

View File

@@ -460,3 +460,12 @@ def get_processor_info():
break
return tmp_list
def undline_name(name):
"""
This convert name which has contain '-' to '_'
:param name: name which contain '-' and ' '
:return: name_str which contain'_'
"""
return common.undline_name(name)