mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
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:
@@ -585,3 +585,12 @@ def get_pt_dev():
|
||||
cap_pt = PASSTHRU_DEVS
|
||||
|
||||
return cap_pt
|
||||
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user