mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 13:08:42 +00:00
config-tools: add property check before IVSHMEM
If IVSHMEM is not presented, reading its property could lead to failure in js. Add property check before it. Tracked-On: #7500 Signed-off-by: Wu Zhou <wu.zhou@intel.com>
This commit is contained in:
parent
c4f46d9c28
commit
7750a6c25b
@ -286,12 +286,14 @@ export default {
|
||||
},
|
||||
vmNameChange(newname, oldname) {
|
||||
let hvdata = this.scenario.hv
|
||||
for (let key in hvdata.FEATURES.IVSHMEM.IVSHMEM_REGION) {
|
||||
let region = hvdata.FEATURES.IVSHMEM.IVSHMEM_REGION[key]
|
||||
for (let key1 in region.IVSHMEM_VMS.IVSHMEM_VM) {
|
||||
let ivshmem_vm = region.IVSHMEM_VMS.IVSHMEM_VM[key1];
|
||||
if (ivshmem_vm.VM_NAME === oldname) {
|
||||
ivshmem_vm.VM_NAME = newname
|
||||
if (hvdata.FEATURES.hasOwnProperty('IVSHMEM')) {
|
||||
for (let key in hvdata.FEATURES.IVSHMEM.IVSHMEM_REGION) {
|
||||
let region = hvdata.FEATURES.IVSHMEM.IVSHMEM_REGION[key]
|
||||
for (let key1 in region.IVSHMEM_VMS.IVSHMEM_VM) {
|
||||
let ivshmem_vm = region.IVSHMEM_VMS.IVSHMEM_VM[key1];
|
||||
if (ivshmem_vm.VM_NAME === oldname) {
|
||||
ivshmem_vm.VM_NAME = newname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user