cpu: Detect arch when parsing CPU data

A CPU data XML file already contains the architecture, let the parser
use it to detect which CPU driver should be used to parse the rest of
the file.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark
2015-06-29 11:08:30 +02:00
parent a68ab347d5
commit 7ab88767a7
3 changed files with 51 additions and 27 deletions

View File

@@ -98,7 +98,7 @@ typedef char *
(*cpuArchDataFormat)(const virCPUData *data);
typedef virCPUDataPtr
(*cpuArchDataParse) (const char *xmlStr);
(*cpuArchDataParse) (xmlXPathContextPtr ctxt);
typedef int
(*cpuArchGetModels) (char ***models);
@@ -207,8 +207,7 @@ cpuGetModels(const char *arch, char ***models)
*/
char *cpuDataFormat(const virCPUData *data)
ATTRIBUTE_NONNULL(1);
virCPUDataPtr cpuDataParse(virArch arch,
const char *xmlStr)
ATTRIBUTE_NONNULL(2);
virCPUDataPtr cpuDataParse(const char *xmlStr)
ATTRIBUTE_NONNULL(1);
#endif /* __VIR_CPU_H__ */