mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
openvz: Remove use of virDomainLiveConfigHelperMethod
This commit is contained in:
parent
fcc3ccf3cd
commit
3bd161f862
@ -2084,7 +2084,7 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
struct openvz_driver *driver = dom->conn->privateData;
|
||||
virDomainDeviceDefPtr dev = NULL;
|
||||
virDomainObjPtr vm = NULL;
|
||||
virDomainDefPtr vmdef = NULL;
|
||||
virDomainDefPtr def = NULL;
|
||||
bool persist = false;
|
||||
|
||||
virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
@ -2098,22 +2098,17 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
_("no domain with matching uuid"));
|
||||
goto cleanup;
|
||||
}
|
||||
vmdef = vm->def;
|
||||
|
||||
if (virStrToLong_i(vmdef->name, NULL, 10, &veid) < 0) {
|
||||
if (virStrToLong_i(vm->def->name, NULL, 10, &veid) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Could not convert domain name to VEID"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virDomainLiveConfigHelperMethod(driver->caps,
|
||||
driver->xmlopt,
|
||||
vm,
|
||||
&flags,
|
||||
&vmdef) < 0)
|
||||
if (!(def = virDomainObjGetOneDef(vm, flags)))
|
||||
goto cleanup;
|
||||
|
||||
dev = virDomainDeviceDefParse(xml, vmdef, driver->caps, driver->xmlopt,
|
||||
dev = virDomainDeviceDefParse(xml, def, driver->caps, driver->xmlopt,
|
||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||
if (!dev)
|
||||
goto cleanup;
|
||||
@ -2121,7 +2116,7 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG)
|
||||
persist = true;
|
||||
|
||||
if (openvzUpdateDevice(vmdef, dev, persist) < 0)
|
||||
if (openvzUpdateDevice(def, dev, persist) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user