mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 08:35:22 +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,
|
* changed even if we failed to attach the device. For example,
|
||||||
* a new controller may be created.
|
* 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;
|
ret = -1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -8732,7 +8732,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
/* Finally, if no error until here, we can save config. */
|
/* Finally, if no error until here, we can save config. */
|
||||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||||
ret = virDomainSaveConfig(cfg->configDir, driver->caps, vmdef);
|
ret = virDomainSaveConfig(cfg->configDir, caps, vmdef);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
virDomainObjAssignDef(vm, vmdef, false, NULL);
|
virDomainObjAssignDef(vm, vmdef, false, NULL);
|
||||||
vmdef = NULL;
|
vmdef = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user