[PATCH 08/14] qemu: pass priv data to qemuBuildMasterKeyCommandLine

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index da59a1fd63..5441f5e37f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -201,8 +201,7 @@ qemuBuildHasMasterKey(virQEMUCapsPtr qemuCaps)
  */
 static int
 qemuBuildMasterKeyCommandLine(virCommandPtr cmd,
-                              virQEMUCapsPtr qemuCaps,
-                              const char *domainLibDir)
+                              qemuDomainObjPrivatePtr priv)
 {
     int ret = -1;
     char *alias = NULL;
@@ -213,7 +212,7 @@ qemuBuildMasterKeyCommandLine(virCommandPtr cmd,
      * means the domain won't be able to use a secret master key and is
      * not a failure.
      */
-    if (!qemuBuildHasMasterKey(qemuCaps)) {
+    if (!qemuBuildHasMasterKey(priv->qemuCaps)) {
         VIR_INFO("secret object is not supported by this QEMU binary");
         return 0;
     }
@@ -226,7 +225,7 @@ qemuBuildMasterKeyCommandLine(virCommandPtr cmd,
      * than other command line options which do not check for the
      * existence of socket files before using.
      */
-    if (!(path = qemuDomainGetMasterKeyFilePath(domainLibDir)))
+    if (!(path = qemuDomainGetMasterKeyFilePath(priv->libDir)))
         goto cleanup;
 
     virCommandAddArg(cmd, "-object");
@@ -9962,7 +9961,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
     virDomainDefPtr def = vm->def;
     virQEMUCapsPtr qemuCaps = priv->qemuCaps;
     virBitmapPtr nodeset = priv->autoNodeset;
-    const char *domainLibDir = priv->libDir;
     bool chardevStdioLogd = priv->chardevStdioLogd;
 
     VIR_DEBUG("driver=%p def=%p mon=%p json=%d "
@@ -9991,7 +9989,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
     if (!standalone)
         virCommandAddArg(cmd, "-S"); /* freeze CPU */
 
-    if (qemuBuildMasterKeyCommandLine(cmd, qemuCaps, domainLibDir) < 0)
+    if (qemuBuildMasterKeyCommandLine(cmd, priv) < 0)
         goto error;
 
     if (enableFips)
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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