提交 e2ca6eb0 编写于 作者: J Ján Tomko

qemu: use def instead of vm->def in qemuExtDevicesStart

We have a helper variable to make the code more concise,
use it consistently.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
上级 f84c7c67
...@@ -159,11 +159,11 @@ qemuExtDevicesStart(virQEMUDriverPtr driver, ...@@ -159,11 +159,11 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
int ret = 0; int ret = 0;
size_t i; size_t i;
if (qemuExtDevicesInitPaths(driver, vm->def) < 0) if (qemuExtDevicesInitPaths(driver, def) < 0)
return -1; return -1;
for (i = 0; i < vm->def->nvideos; i++) { for (i = 0; i < def->nvideos; i++) {
virDomainVideoDefPtr video = vm->def->videos[i]; virDomainVideoDefPtr video = def->videos[i];
if (video->backend == VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER) { if (video->backend == VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER) {
ret = qemuExtVhostUserGPUStart(driver, vm, video); ret = qemuExtVhostUserGPUStart(driver, vm, video);
...@@ -172,7 +172,7 @@ qemuExtDevicesStart(virQEMUDriverPtr driver, ...@@ -172,7 +172,7 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
} }
} }
if (vm->def->tpm) if (def->tpm)
ret = qemuExtTPMStart(driver, vm, incomingMigration); ret = qemuExtTPMStart(driver, vm, incomingMigration);
for (i = 0; i < def->nnets; i++) { for (i = 0; i < def->nnets; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册