virCaps: get rid of defaultConsoleTargetType callback

This patch refactors various places to allow removing of the
defaultConsoleTargetType callback from the virCaps structure.

A new console character device target type is introduced -
VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
specified in the XML. This type is at the end converted to the standard
VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
different from this default have to be processed separately in the
device post parse callback.
This commit is contained in:
Peter Krempa
2013-04-04 22:42:39 +02:00
parent 46becc18ba
commit 482e5f159c
32 changed files with 278 additions and 315 deletions
-7
View File
@@ -15,11 +15,6 @@ static virCapsPtr caps;
static virVMXContext ctx;
static virDomainXMLOptionPtr xmlopt;
static int testDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED,
virArch arch ATTRIBUTE_UNUSED)
{
return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
}
static void
testCapsInit(void)
@@ -32,8 +27,6 @@ testCapsInit(void)
return;
}
caps->defaultConsoleTargetType = testDefaultConsoleType;
virCapabilitiesAddHostMigrateTransport(caps, "esx");