[PATCH v2 06/11] qemuDomainGetMachineName: Access embeddedRoot from driver rather than cfg

Michal Privoznik mprivozn at redhat.com
Thu Mar 26 15:15:10 UTC 2020


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

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
Reviewed-by: Andrea Bolognani <abologna at redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
---
 src/qemu/qemu_domain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a58d658e0b..e71010b7e5 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -16528,7 +16528,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) {
@@ -16538,7 +16537,8 @@ qemuDomainGetMachineName(virDomainObjPtr vm)
     }
 
     if (!ret)
-        ret = virDomainDriverGenerateMachineName("qemu", cfg->root,
+        ret = virDomainDriverGenerateMachineName("qemu",
+                                                 virQEMUDriverGetEmbedRoot(driver),
                                                  vm->def->id, vm->def->name,
                                                  virQEMUDriverIsPrivileged(driver));
 
-- 
2.24.1




More information about the libvir-list mailing list