1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05:19 +00:00

qemuDomainGetMachineName: Access embeddedRoot from driver rather than cfg

The cfg->root is going away, therefore get the info right from
the driver structure.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Michal Privoznik 2020-03-23 08:48:38 +01:00
parent 5bc3299447
commit be0e311572

View File

@ -12980,7 +12980,6 @@ qemuDomainGetMachineName(virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virQEMUDriverPtr driver = priv->driver;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
char *ret = NULL;
if (vm->pid > 0) {
@ -12990,7 +12989,8 @@ qemuDomainGetMachineName(virDomainObjPtr vm)
}
if (!ret)
ret = virDomainDriverGenerateMachineName("qemu", cfg->root,
ret = virDomainDriverGenerateMachineName("qemu",
driver->embeddedRoot,
vm->def->id, vm->def->name,
driver->privileged);