mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 23:55:23 +00:00
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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e73f6b4d66
commit
604f3ff0c0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user