提交 604f3ff0 编写于 作者: M Michal Privoznik

qemuDomainDetachDeviceLiveAndConfig: Don't use driver->caps directly

Funny, we obtain driver caps at the beginning of the function,
but then for unknown reason access driver->caps directly.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 e73f6b4d
......@@ -8724,7 +8724,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
* changed even if we failed to attach the device. For example,
* a new controller may be created.
*/
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, caps) < 0) {
ret = -1;
goto cleanup;
}
......@@ -8732,7 +8732,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
/* Finally, if no error until here, we can save config. */
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
ret = virDomainSaveConfig(cfg->configDir, driver->caps, vmdef);
ret = virDomainSaveConfig(cfg->configDir, caps, vmdef);
if (!ret) {
virDomainObjAssignDef(vm, vmdef, false, NULL);
vmdef = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册