From e8f064000d29c3c07e81fdb9727c4b5fd70b54ee Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 15 Feb 2007 19:07:06 +0000 Subject: [PATCH] Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin * qemud/conf.c: fix the output - we weren't handling sdl --- ChangeLog | 5 +++++ qemud/conf.c | 30 ++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01f6995bec..7c3e12561c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin + + * qemud/conf.c: fix the output - we weren't + handling sdl + Thu Feb 15 19:06:22 IST 2007 Mark McLoughlin * qemud/conf.c: fix a couple of typos diff --git a/qemud/conf.c b/qemud/conf.c index 4129731cdc..e41452466e 100644 --- a/qemud/conf.c +++ b/qemud/conf.c @@ -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, " 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, " \n") < 0) + goto no_memory; + break; + + case QEMUD_GRAPHICS_NONE: + default: + break; + } + if (def->graphicsType == QEMUD_GRAPHICS_VNC) { - if (def->vncPort) { - qemudBufferPrintf(&buf, " \n", - vm->id >= 0 && live ? def->vncActivePort : def->vncPort); - } else { - qemudBufferPrintf(&buf, " \n"); - } } if (qemudBufferAdd(&buf, " \n") < 0)