mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
testQemuGetRealCaps: Strip the default machine alias before insertion into cache
Expand the default machine type alias of the 'latest' capabilities for an architecture before caching it rather than after copying it, so that we don't duplicate the work all the time. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
64dcb59756
commit
b5ddd072bc
@ -931,14 +931,14 @@ testQemuGetRealCaps(const char *arch,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (stripmachinealiases)
|
||||
virQEMUCapsStripMachineAliases(cachedcaps);
|
||||
|
||||
g_hash_table_insert(capsCache, g_strdup(capsfile), cachedcaps);
|
||||
}
|
||||
|
||||
ret = virQEMUCapsNewCopy(cachedcaps);
|
||||
|
||||
if (stripmachinealiases)
|
||||
virQEMUCapsStripMachineAliases(ret);
|
||||
|
||||
/* strip 'xml' suffix so that we can format the file to '.replies' */
|
||||
capsfile[strlen(capsfile) - 3] = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user