]> xenbits.xensource.com Git - libvirt.git/commitdiff
Implement driver for virDomainGetOSType in QEMU guests
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 16 Apr 2007 13:10:05 +0000 (13:10 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 16 Apr 2007 13:10:05 +0000 (13:10 +0000)
ChangeLog
src/qemu_internal.c

index 9be0b1999db436b38685e8676f05aa26bc3823b3..95b6456f128b3fd8acc126e501f498551ba6eab1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * python/generator.py, python/libvir.py: Ensure that connection
index 4592278461e48f178105dff6bd17d5bf05fe9ffc..ecfce220897eb91d5df1ddb8b6589d978ea81c41 100644 (file)
@@ -682,6 +682,17 @@ static int qemuDestroyDomain(virDomainPtr domain) {
     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) {
     return qemuDestroyDomain(domain);
 }
@@ -1304,7 +1315,7 @@ static virDriver qemuDriver = {
     qemuShutdownDomain, /* domainShutdown */
     NULL, /* domainReboot */
     qemuDestroyDomain, /* domainDestroy */
-    NULL, /* domainGetOSType */
+    qemuDomainGetOSType, /* domainGetOSType */
     NULL, /* domainGetMaxMemory */
     NULL, /* domainSetMaxMemory */
     NULL, /* domainSetMemory */