/* Ignore binary if extracting version info fails */
if (binary &&
- qemuCapsExtractVersionInfo(binary, info->arch, NULL, &qemuCaps) < 0)
+ qemuCapsExtractVersionInfo(binary, info->arch,
+ false, NULL, &qemuCaps) < 0)
VIR_FREE(binary);
/* qemu-kvm/kvm binaries can only be used if
continue;
if (qemuCapsExtractVersionInfo(kvmbin, info->arch,
- NULL, &kvmCaps) < 0) {
+ false, NULL,
+ &kvmCaps) < 0) {
VIR_FREE(kvmbin);
continue;
}
return 0;
}
-int qemuCapsExtractVersionInfo(const char *qemu, const char *arch,
+int qemuCapsExtractVersionInfo(const char *qemu,
+ const char *arch,
+ bool check_yajl,
unsigned int *retversion,
virBitmapPtr *retflags)
{
if (!(flags = qemuCapsNew()) ||
qemuCapsParseHelpStr(qemu, help, flags,
- &version, &is_kvm, &kvm_version, true) == -1)
+ &version, &is_kvm, &kvm_version,
+ check_yajl) == -1)
goto cleanup;
/* Currently only x86_64 and i686 support PCI-multibus. */
return -1;
}
- if (qemuCapsExtractVersionInfo(binary, ut.machine, version, NULL) < 0) {
+ if (qemuCapsExtractVersionInfo(binary, ut.machine, false,
+ version, NULL) < 0) {
return -1;
}
int qemuCapsExtractVersion(virCapsPtr caps,
unsigned int *version);
-int qemuCapsExtractVersionInfo(const char *qemu, const char *arch,
+int qemuCapsExtractVersionInfo(const char *qemu,
+ const char *arch,
+ bool check_yajl,
unsigned int *version,
virBitmapPtr *qemuCaps);
if (!qemuCaps) {
/* need to get information from real environment */
if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch,
- NULL,
+ false, NULL,
&localCaps) < 0)
goto cleanup;
qemuCaps = localCaps;
if (!qemuCaps) {
/* need to get information from real environment */
if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch,
+ false,
NULL,
&localCaps) < 0)
goto cleanup;
*/
if (!priv->qemuCaps &&
qemuCapsExtractVersionInfo(obj->def->emulator, obj->def->os.arch,
+ false,
NULL,
&priv->qemuCaps) < 0)
goto error;
qemuCapsFree(priv->qemuCaps);
priv->qemuCaps = NULL;
if (qemuCapsExtractVersionInfo(vm->def->emulator, vm->def->os.arch,
+ true,
NULL,
&priv->qemuCaps) < 0)
goto cleanup;
priv->qemuCaps = NULL;
if (qemuCapsExtractVersionInfo(vm->def->emulator,
vm->def->os.arch,
+ false,
NULL,
&priv->qemuCaps) < 0)
goto cleanup;