From 6d811124289de5732441f1bb0042e0b3944e47b3 Mon Sep 17 00:00:00 2001 From: "Yang,Yu-chu" Date: Tue, 27 Apr 2021 12:28:05 -0700 Subject: [PATCH] config-tools: refine ivshmem devices in pci_dev_c.py Add comma to the last member of ivshmem pci devices. If the last element ends without comma, the clang-format would attach the brackets to the first and last lines. Tracked-On: #5980 Signed-off-by: Yang,Yu-chu Reviewed-by: Junjie Mao --- misc/config_tools/scenario_config/pci_dev_c.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/config_tools/scenario_config/pci_dev_c.py b/misc/config_tools/scenario_config/pci_dev_c.py index 466b484d6..5969f34fa 100644 --- a/misc/config_tools/scenario_config/pci_dev_c.py +++ b/misc/config_tools/scenario_config/pci_dev_c.py @@ -262,12 +262,12 @@ def generate_file(vm_info, config): if shm_name == shm_splited[0].strip(): if scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "PRE_LAUNCHED_VM": print("\t\t.shm_region_name = IVSHMEM_SHM_REGION_{},".format(region), file=config) - print("\t\tIVSHMEM_DEVICE_{}_VBAR".format(index), file=config) + print("\t\tIVSHMEM_DEVICE_{}_VBAR,".format(index), file=config) elif scenario_cfg_lib.VM_DB[vm_type]['load_type'] == "SOS_VM": print("\t\t.shm_region_name = IVSHMEM_SHM_REGION_{},".format(region), file=config) - print("\t\tSOS_IVSHMEM_DEVICE_{}_VBAR".format(index), file=config) + print("\t\tSOS_IVSHMEM_DEVICE_{}_VBAR,".format(index), file=config) else: - print("\t\t.shm_region_name = IVSHMEM_SHM_REGION_{}".format(region), file=config) + print("\t\t.shm_region_name = IVSHMEM_SHM_REGION_{},".format(region), file=config) pci_cnt += 1 index += 1 print("\t},", file=config)