From 482e5f159c24ba8b25b195de92b7266bb2a92820 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 13 Mar 2013 21:39:34 +0100 Subject: 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. --- tests/testutilsxen.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests/testutilsxen.c') diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c index 2eb47303d0..1b5ee79021 100644 --- a/tests/testutilsxen.c +++ b/tests/testutilsxen.c @@ -6,20 +6,6 @@ #include "testutilsxen.h" #include "domain_conf.h" -static int testXenDefaultConsoleType(const char *ostype, - virArch arch ATTRIBUTE_UNUSED) -{ - if (STREQ(ostype, "hvm")) - return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL; - else - return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_XEN; -} - -virDomainXMLOptionPtr -testXenXMLConfInit(void) -{ - return virDomainXMLOptionNew(NULL, NULL, NULL); -} virCapsPtr testXenCapsInit(void) { struct utsname utsname; @@ -39,8 +25,6 @@ virCapsPtr testXenCapsInit(void) { 0, 0)) == NULL) return NULL; - caps->defaultConsoleTargetType = testXenDefaultConsoleType; - nmachines = ARRAY_CARDINALITY(x86_machines); if ((machines = virCapabilitiesAllocMachines(x86_machines, nmachines)) == NULL) goto cleanup; -- cgit v1.2.1