]> xenbits.xensource.com Git - libvirt.git/commitdiff
Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
authorMark McLoughlin <markmc@redhat.com>
Thu, 15 Feb 2007 19:07:06 +0000 (19:07 +0000)
committerMark McLoughlin <markmc@redhat.com>
Thu, 15 Feb 2007 19:07:06 +0000 (19:07 +0000)
        * qemud/conf.c: fix the <graphics> output - we weren't
        handling sdl

ChangeLog
qemud/conf.c

index 01f6995bec7476d714345edcff7e806a7da74d3d..7c3e12561c8d0cf4c8e56cf3412285bbb93524f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
+
+       * qemud/conf.c: fix the <graphics> output - we weren't
+       handling sdl
+       
 Thu Feb 15 19:06:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
 
        * qemud/conf.c: fix a couple of typos
index 4129731cdc9518d283169f2bb4fd84b2a7b56630..e41452466e03a43b6e824f0cf3f3bccef0341294 100644 (file)
@@ -1907,13 +1907,31 @@ char *qemudGenerateXML(struct qemud_server *server, struct qemud_vm *vm, int liv
         net = net->next;
     }
 
+    switch (def->graphicsType) {
+    case QEMUD_GRAPHICS_VNC:
+        if (qemudBufferAdd(&buf, "    <graphics type='vnc'") < 0)
+            goto no_memory;
+
+        if (def->vncPort &&
+            qemudBufferPrintf(&buf, " port='%d'",
+                              vm->id >= 0 && live ? def->vncActivePort : def->vncPort) < 0)
+            goto no_memory;
+
+        if (qemudBufferAdd(&buf, "/>\n") < 0)
+            goto no_memory;
+        break;
+
+    case QEMUD_GRAPHICS_SDL:
+        if (qemudBufferAdd(&buf, "    <graphics type='sdl'/>\n") < 0)
+            goto no_memory;
+        break;
+
+    case QEMUD_GRAPHICS_NONE:
+    default:
+        break;
+    }
+
     if (def->graphicsType == QEMUD_GRAPHICS_VNC) {
-        if (def->vncPort) {
-            qemudBufferPrintf(&buf, "    <graphics type='vnc' port='%d'/>\n",
-                              vm->id >= 0 && live ? def->vncActivePort : def->vncPort);
-        } else {
-            qemudBufferPrintf(&buf, "    <graphics type='vnc'/>\n");
-        }
     }
 
     if (qemudBufferAdd(&buf, "  </devices>\n") < 0)