1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-27 07:22:07 +03:00

vbox: Rewrite vboxDomainGetOSType

This commit is contained in:
Taowei 2014-08-11 18:06:34 +08:00 committed by Michal Privoznik
parent 40b733e7e2
commit 0ba1c21471
3 changed files with 13 additions and 12 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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);