From 0ba1c21471910a49f4321cbaeab2107f235813c7 Mon Sep 17 00:00:00 2001 From: Taowei Date: Mon, 11 Aug 2014 18:06:34 +0800 Subject: [PATCH] vbox: Rewrite vboxDomainGetOSType --- src/vbox/vbox_common.c | 12 ++++++++++++ src/vbox/vbox_tmpl.c | 12 ------------ src/vbox/vbox_uniformed_api.h | 1 + 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 7acd80e232..99e1872f89 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -2603,3 +2603,15 @@ int vboxDomainDestroy(virDomainPtr dom) { return vboxDomainDestroyFlags(dom, 0); } + +char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) { + /* Returning "hvm" always as suggested on list, cause + * this functions seems to be badly named and it + * is supposed to pass the ABI name and not the domain + * operating system driver as I had imagined ;) + */ + char *osType; + + ignore_value(VIR_STRDUP(osType, "hvm")); + return osType; +} diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index c1511affe3..240c856501 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -933,18 +933,6 @@ vboxSocketParseAddrUtf16(vboxGlobalData *data, const PRUnichar *utf16, return result; } -static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) { - /* Returning "hvm" always as suggested on list, cause - * this functions seems to be badly named and it - * is supposed to pass the ABI name and not the domain - * operating system driver as I had imagined ;) - */ - char *osType; - - ignore_value(VIR_STRDUP(osType, "hvm")); - return osType; -} - static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) { VBOX_OBJECT_CHECK(dom->conn, int, -1); diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 935697fbec..31a0e45b26 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -429,6 +429,7 @@ int vboxDomainShutdown(virDomainPtr dom); int vboxDomainReboot(virDomainPtr dom, unsigned int flags); int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags); int vboxDomainDestroy(virDomainPtr dom); +char *vboxDomainGetOSType(virDomainPtr dom); /* Version specified functions for installing uniformed API */ void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); -- GitLab