[patch 4/9] Output SDL graphics XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems we were forgetting to handle QEMUD_GRAPHICS_SDL
in qemudGenerateXML()

Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>

Index: libvirt/qemud/conf.c
===================================================================
--- libvirt.orig/qemud/conf.c
+++ libvirt/qemud/conf.c
@@ -1907,13 +1907,31 @@ char *qemudGenerateXML(struct qemud_serv
         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)

-- 


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]