Implement driver for virDomainGetOSType in QEMU guests

This commit is contained in:
Daniel P. Berrange 2007-04-16 13:10:05 +00:00
parent b4259bbc37
commit 0de8efe4a0
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Apr 16 09:09:04 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_internal.c: Implement virDomainGetOSType driver method
for QEMU guests
Mon Apr 16 08:30:04 EST 2007 Daniel P. Berrange <berrange@redhat.com> Mon Apr 16 08:30:04 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* python/generator.py, python/libvir.py: Ensure that connection * python/generator.py, python/libvir.py: Ensure that connection

View File

@ -682,6 +682,17 @@ static int qemuDestroyDomain(virDomainPtr domain) {
return 0; return 0;
} }
static char *qemuDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED) {
char *type = strdup("hvm");
if (!type) {
qemuError (domain->conn, domain, VIR_ERR_NO_MEMORY, __FUNCTION__);
return NULL;
}
return type;
}
static int qemuShutdownDomain(virDomainPtr domain) { static int qemuShutdownDomain(virDomainPtr domain) {
return qemuDestroyDomain(domain); return qemuDestroyDomain(domain);
} }
@ -1304,7 +1315,7 @@ static virDriver qemuDriver = {
qemuShutdownDomain, /* domainShutdown */ qemuShutdownDomain, /* domainShutdown */
NULL, /* domainReboot */ NULL, /* domainReboot */
qemuDestroyDomain, /* domainDestroy */ qemuDestroyDomain, /* domainDestroy */
NULL, /* domainGetOSType */ qemuDomainGetOSType, /* domainGetOSType */
NULL, /* domainGetMaxMemory */ NULL, /* domainGetMaxMemory */
NULL, /* domainSetMaxMemory */ NULL, /* domainSetMaxMemory */
NULL, /* domainSetMemory */ NULL, /* domainSetMemory */