[PATCH v2 07/11] qemu: use virQEMUDriverGetEmbedRoot() to access embeddedRoot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that we have shiny accessor for driver->embeddedRoot use it
instead of accessing the struct member directly.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c  | 6 +++---
 src/qemu/qemu_process.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5cbf2f2478..664ea4eeda 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1173,7 +1173,7 @@ static virDrvOpenStatus qemuConnectOpen(virConnectPtr conn,
         return VIR_DRV_OPEN_ERROR;
     }
 
-    if (qemu_driver->embeddedRoot) {
+    if (virQEMUDriverGetEmbedRoot(qemu_driver)) {
         const char *root = virURIGetParam(conn->uri, "root");
         if (!root)
             return VIR_DRV_OPEN_ERROR;
@@ -1184,11 +1184,11 @@ static virDrvOpenStatus qemuConnectOpen(virConnectPtr conn,
             return VIR_DRV_OPEN_ERROR;
         }
 
-        if (STRNEQ(root, qemu_driver->embeddedRoot)) {
+        if (STRNEQ(root, virQEMUDriverGetEmbedRoot(qemu_driver))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Cannot open embedded driver at path '%s', "
                              "already open with path '%s'"),
-                           root, qemu_driver->embeddedRoot);
+                           root, virQEMUDriverGetEmbedRoot(qemu_driver));
             return VIR_DRV_OPEN_ERROR;
         }
     } else {
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index fcb47e8596..b0b2258850 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -6715,7 +6715,7 @@ qemuProcessLaunch(virConnectPtr conn,
                            _("Domain autodestroy requires a connection handle"));
             return -1;
         }
-        if (driver->embeddedRoot) {
+        if (virQEMUDriverGetEmbedRoot(driver)) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("Domain autodestroy not supported for embedded drivers yet"));
             return -1;
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux