qemu: store the emulator name in the capabilities XML

We don't need this for any functional purpose, but when debugging hosts
it is useful to know what binary a given capabilities XML document is
associated with.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2019-12-10 10:23:14 +00:00
parent 0fcc78d51b
commit 42b3e5b9e4
47 changed files with 69 additions and 2 deletions

View File

@@ -283,11 +283,14 @@ qemuTestParseCapabilitiesArch(virArch arch,
const char *capsFile)
{
virQEMUCapsPtr qemuCaps = NULL;
char *binary = g_strdup_printf("/usr/bin/qemu-system-%s",
virArchToString(arch));
if (!(qemuCaps = virQEMUCapsNew()) ||
if (!(qemuCaps = virQEMUCapsNewBinary(binary)) ||
virQEMUCapsLoadCache(arch, qemuCaps, capsFile) < 0)
goto error;
virQEMUCapsSetInvalidation(qemuCaps, false);
return qemuCaps;
error: