virCaps: conf: start splitting out irrelevat data

The virCaps structure gathered a ton of irrelevant data over time that.
The original reason is that it was propagated to the XML parser
functions.

This patch aims to create a new data structure virDomainXMLConf that
will contain immutable data that are used by the XML parser. This will
allow two things we need:

1) Get rid of the stuff from virCaps

2) Allow us to add callbacks to check and add driver specific stuff
after domain XML is parsed.

This first attempt removes pointers to private data allocation functions
to this new structure and update all callers and function that require
them.
This commit is contained in:
Peter Krempa
2013-03-05 16:17:24 +01:00
parent be27de6e8d
commit 27cf98e2d1
65 changed files with 659 additions and 424 deletions

View File

@@ -450,7 +450,7 @@ static qemuMonitorCallbacks qemuCallbacks = {
#define QEMU_TEXT_GREETING "QEMU 1.0,1 monitor - type 'help' for more information"
qemuMonitorTestPtr qemuMonitorTestNew(bool json, virCapsPtr caps)
qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLConfPtr xmlconf)
{
qemuMonitorTestPtr test = NULL;
virDomainChrSourceDef src;
@@ -482,7 +482,7 @@ qemuMonitorTestPtr qemuMonitorTestNew(bool json, virCapsPtr caps)
goto no_memory;
test->json = json;
if (!(test->vm = virDomainObjNew(caps)))
if (!(test->vm = virDomainObjNew(xmlconf)))
goto error;
if (virNetSocketNewListenUNIX(path,