mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: use host CPU object directly
Avoid grabbing the whole virCapsPtr object when we only need the host CPU information. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -144,7 +144,6 @@ testQemuCapsCopy(const void *opaque)
|
||||
int ret = -1;
|
||||
const testQemuData *data = opaque;
|
||||
char *capsFile = NULL;
|
||||
virCapsPtr caps = NULL;
|
||||
virQEMUCapsPtr orig = NULL;
|
||||
virQEMUCapsPtr copy = NULL;
|
||||
char *actual = NULL;
|
||||
@@ -153,11 +152,8 @@ testQemuCapsCopy(const void *opaque)
|
||||
data->outputDir, data->prefix, data->version,
|
||||
data->archName);
|
||||
|
||||
if (!(caps = virCapabilitiesNew(virArchFromString(data->archName),
|
||||
false, false)))
|
||||
goto cleanup;
|
||||
|
||||
if (!(orig = qemuTestParseCapabilities(caps, capsFile)))
|
||||
if (!(orig = qemuTestParseCapabilitiesArch(
|
||||
virArchFromString(data->archName), capsFile)))
|
||||
goto cleanup;
|
||||
|
||||
if (!(copy = virQEMUCapsNewCopy(orig)))
|
||||
@@ -173,7 +169,6 @@ testQemuCapsCopy(const void *opaque)
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(capsFile);
|
||||
virObjectUnref(caps);
|
||||
virObjectUnref(orig);
|
||||
virObjectUnref(copy);
|
||||
VIR_FREE(actual);
|
||||
|
||||
Reference in New Issue
Block a user