mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuBuildCommandLine: Inline qemuCheckFips
Now that we store the state of the host FIPS mode setting in the qemu driver object, we don't need to outsource the logic into 'qemuCheckFips'. Additionally since we no longer support very old qemu's which would not yet have --enable-fips we can drop the part of the comment about very old qemus. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -386,11 +386,9 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,
|
||||
unsigned int flags)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
bool enableFips;
|
||||
size_t i;
|
||||
|
||||
drv->hostFips = flags & FLAG_FIPS_HOST;
|
||||
enableFips = drv->hostFips;
|
||||
|
||||
if (qemuProcessCreatePretendCmdPrepare(drv, vm, migrateURI,
|
||||
VIR_QEMU_PROCESS_START_COLD) < 0)
|
||||
@@ -486,12 +484,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,
|
||||
}
|
||||
}
|
||||
|
||||
/* we can't use qemuCheckFips() directly as it queries host state */
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_ENABLE_FIPS))
|
||||
enableFips = false;
|
||||
|
||||
return qemuProcessCreatePretendCmdBuild(vm, migrateURI,
|
||||
enableFips, 0);
|
||||
return qemuProcessCreatePretendCmdBuild(vm, migrateURI, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user