summaryrefslogtreecommitdiff
path: root/tests/testutilsxen.c
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2013-03-13 21:39:34 +0100
committerPeter Krempa <pkrempa@redhat.com>2013-04-04 22:42:39 +0200
commit482e5f159c24ba8b25b195de92b7266bb2a92820 (patch)
treed6ae689efefb2675bf242fe11d8d18d990b1d917 /tests/testutilsxen.c
parent46becc18ba125d0fbe2b39c054a105fe9c97c5ab (diff)
downloadlibvirt-482e5f159c24ba8b25b195de92b7266bb2a92820.tar.gz
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.
Diffstat (limited to 'tests/testutilsxen.c')
-rw-r--r--tests/testutilsxen.c16
1 files changed, 0 insertions, 16 deletions
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;