Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
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