mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
cpu: Introduce virCPUDataNew
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
e2f7138af4
commit
4cd9545d89
@ -311,6 +311,25 @@ cpuEncode(virArch arch,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virCPUDataNew:
|
||||
*
|
||||
* Returns an allocated memory for virCPUData or NULL on error.
|
||||
*/
|
||||
virCPUDataPtr
|
||||
virCPUDataNew(virArch arch)
|
||||
{
|
||||
virCPUDataPtr data;
|
||||
|
||||
if (VIR_ALLOC(data) < 0)
|
||||
return NULL;
|
||||
|
||||
data->arch = arch;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* cpuDataFree:
|
||||
*
|
||||
|
@ -162,6 +162,9 @@ cpuEncode (virArch arch,
|
||||
virCPUDataPtr *vendor)
|
||||
ATTRIBUTE_NONNULL(2);
|
||||
|
||||
virCPUDataPtr
|
||||
virCPUDataNew(virArch arch);
|
||||
|
||||
void
|
||||
cpuDataFree (virCPUDataPtr data);
|
||||
|
||||
|
@ -994,6 +994,7 @@ virCPUCompareXML;
|
||||
virCPUConvertLegacy;
|
||||
virCPUDataCheckFeature;
|
||||
virCPUDataFormat;
|
||||
virCPUDataNew;
|
||||
virCPUDataParse;
|
||||
virCPUGetModels;
|
||||
virCPUTranslate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user