提交 4cd9545d 编写于 作者: J Jiri Denemark

cpu: Introduce virCPUDataNew

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 e2f7138a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册