Skip to content

Commit d9f0d8d

Browse files
Wei Liuwenlingz
authored andcommitted
acrn-config: fix the wrong 'key' type returned to webUI
Fix the wrong 'key' type of error list returned to webUI for parsing. Tracked-On: #3913 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
1 parent e713458 commit d9f0d8d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

misc/acrn-config/library/launch_cfg_lib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def pt_devs_check(bdf_list, vpid_list, item):
425425
if is_bdf_format(bdf_str):
426426
continue
427427
else:
428-
key = "uos,id={},passthrough_devices,{}".format(i_cnt, item)
428+
key = "uos:id={},passthrough_devices,{}".format(i_cnt, item)
429429
ERR_LIST[key] = "Unkonw the BDF format of {} device".format(item)
430430
i_cnt += 1
431431

@@ -435,7 +435,7 @@ def pt_devs_check(bdf_list, vpid_list, item):
435435
if is_vpid_format(vpid_str):
436436
continue
437437
else:
438-
key = "uos,id={},passthrough_devices,{}".format(i_cnt, item)
438+
key = "uos:id={},passthrough_devices,{}".format(i_cnt, item)
439439
ERR_LIST[key] = "Unkonw the Vendor:Product ID format of {} device".format(item)
440440

441441
i_cnt += 1
@@ -448,7 +448,7 @@ def empty_err(i_cnt, item):
448448
:param item: the item of tag from config xml
449449
:return: None
450450
"""
451-
key = "uos,id={},{}".format(i_cnt, item)
451+
key = "uos:id={},{}".format(i_cnt, item)
452452
ERR_LIST[key] = "The parameter should not be empty"
453453

454454

@@ -473,7 +473,7 @@ def args_aval_check(arg_list, item, avl_list):
473473
continue
474474

475475
if arg_str not in avl_list:
476-
key = "uos,id={},{}".format(i_cnt, item)
476+
key = "uos:id={},{}".format(i_cnt, item)
477477
ERR_LIST[key] = "The {} is invalidate".format(item)
478478
i_cnt += 1
479479

@@ -532,7 +532,7 @@ def mem_size_check(arg_list, item):
532532

533533
mem_size_set = int(arg_str.strip())
534534
if mem_size_set > total_mem_mb:
535-
key = "uos,id={},{}".format(i_cnt, item)
535+
key = "uos:id={},{}".format(i_cnt, item)
536536
ERR_LIST[key] = "{}MB should be less than total memory {}MB".format(item)
537537
i_cnt += 1
538538

misc/acrn-config/library/scenario_cfg_lib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def check_board_private_info():
202202
(err_dic, private_info) = get_board_private_info(SCENARIO_INFO_FILE)
203203

204204
if not private_info['rootfs'] and err_dic:
205-
ERR_LIST['vm,id=0,boot_private,rootfs'] = "The board have to chose one rootfs partition"
205+
ERR_LIST['vm:id=0,boot_private,rootfs'] = "The board have to chose one rootfs partition"
206206
ERR_LIST.update(err_dic)
207207

208208

@@ -718,14 +718,14 @@ def avl_vuart_ui_select(scenario_info):
718718
vm_type = get_order_type_by_vmid(vm_i)
719719

720720
if vm_type == "SOS_VM":
721-
key = "vm={},vuart=0,base".format(vm_i)
721+
key = "vm={}:vuart=0,base".format(vm_i)
722722
tmp_vuart[key] = ['SOS_COM1_BASE', 'INVALID_COM_BASE']
723-
key = "vm={},vuart=1,base".format(vm_i)
723+
key = "vm={}:vuart=1,base".format(vm_i)
724724
tmp_vuart[key] = ['SOS_COM2_BASE', 'INVALID_COM_BASE']
725725
else:
726-
key = "vm={},vuart=0,base".format(vm_i)
726+
key = "vm={}:vuart=0,base".format(vm_i)
727727
tmp_vuart[key] = ['INVALID_COM_BASE', 'COM1_BASE']
728-
key = "vm={},vuart=1,base".format(vm_i)
728+
key = "vm={}:vuart=1,base".format(vm_i)
729729
tmp_vuart[key] = ['INVALID_COM_BASE', 'COM2_BASE']
730730

731731
#print(tmp_vuart)

0 commit comments

Comments
 (0)