misc: configurator: Add entry "None" to HV console selector

Add an explicit "None" entry in HV console selector if user would like
to disable debug console or there is no serial console available.

Tracked-On: #7546
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
This commit is contained in:
Calvin Zhang
2022-05-23 17:29:54 +08:00
committed by acrnsi-robot
parent 579e5247fb
commit 17d8eaa7ae
3 changed files with 6 additions and 12 deletions

View File

@@ -53,15 +53,16 @@ class BusDevFunc(namedtuple(
def parse_hv_console(scenario_etree):
"""
There may be 3 types in the console item
There may be 4 types in the console item
1. BDF:(00:18.2) seri:/dev/ttyS2
2. /dev/ttyS2
3. ttyS2
4. "None"
"""
ttys_n = ''
ttys = common.get_node("//SERIAL_CONSOLE/text()", scenario_etree)
if not ttys or ttys == None:
if not ttys or ttys == None or ttys == 'None':
return ttys_n
if ttys and 'BDF' in ttys or '/dev' in ttys: