From patchwork Tue Mar 15 12:36:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 86973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0FD49B700D for ; Tue, 15 Mar 2011 23:37:51 +1100 (EST) Received: from localhost ([127.0.0.1]:60049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzTVU-0001bQ-3n for incoming@patchwork.ozlabs.org; Tue, 15 Mar 2011 08:37:48 -0400 Received: from [140.186.70.92] (port=44355 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzTUX-0001aD-I0 for qemu-devel@nongnu.org; Tue, 15 Mar 2011 08:36:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzTUW-0006yy-DX for qemu-devel@nongnu.org; Tue, 15 Mar 2011 08:36:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzTUW-0006ym-2W for qemu-devel@nongnu.org; Tue, 15 Mar 2011 08:36:48 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2FCakA8020384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Mar 2011 08:36:46 -0400 Received: from red-feather.redhat.com (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2FCabh3010325; Tue, 15 Mar 2011 08:36:45 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Tue, 15 Mar 2011 13:36:11 +0100 Message-Id: <1300192574-32644-5-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1300192574-32644-1-git-send-email-Jes.Sorensen@redhat.com> References: <1300192574-32644-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: jan.kiszka@siemens.com, peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH 4/7] Add support for -display vnc X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen Signed-off-by: Jes Sorensen --- qemu-options.hx | 5 ++++- vl.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 80506e7..e2a31bc 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -592,7 +592,8 @@ ETEXI DEF("display", HAS_ARG, QEMU_OPTION_display, "-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]\n" - " [,window_close=on|off]|curses|none|serial\n" + " [,window_close=on|off]|curses|none|serial|\n" + " vnc=[,]\n" " select display type\n", QEMU_ARCH_ALL) STEXI @item -display @var{type} @@ -620,6 +621,8 @@ command line application. The emulated serial port is redirected on the console. Therefore, you can still use QEMU to debug a Linux kernel with a serial console. This option is equivalent to the old -nographic argument. +@item vnc +Start a VNC server on display @end table ETEXI diff --git a/vl.c b/vl.c index d12ac96..e58958d 100644 --- a/vl.c +++ b/vl.c @@ -1610,6 +1610,20 @@ static DisplayType select_display(const char *p) fprintf(stderr, "SDL support is disabled\n"); exit(1); #endif + } else if (strstart(p, "vnc", &opts)) { + display_remote++; + + if (*opts) { + const char *nextopt; + + if (strstart(opts, "=", &nextopt)) { + vnc_display = nextopt; + } + } + if (!vnc_display) { + fprintf(stderr, "VNC requires a display argument vnc=\n"); + exit(1); + } } else if (strstart(p, "curses", &opts)) { #ifdef CONFIG_CURSES display = DT_CURSES;