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 <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Yang,Yu-chu 2021-04-27 12:28:05 -07:00 committed by wenlingz
parent 982b4c1e0e
commit 6d81112428
1 changed files with 3 additions and 3 deletions

View File

@ -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)