From patchwork Tue Dec 8 12:11:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 40626 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 DD8DFB7B66 for ; Tue, 8 Dec 2009 23:57:25 +1100 (EST) Received: from localhost ([127.0.0.1]:37482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHzd5-0004VJ-Aj for incoming@patchwork.ozlabs.org; Tue, 08 Dec 2009 07:57:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHyvW-0005mg-Qh for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHyvQ-0005ir-Pn for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:20 -0500 Received: from [199.232.76.173] (port=44206 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHyvP-0005iM-GC for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34928) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHyvO-00083v-UZ for qemu-devel@nongnu.org; Tue, 08 Dec 2009 07:12:15 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB8CCEOG000675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Dec 2009 07:12:14 -0500 Received: from zweiblum.home.kraxel.org (vpn2-9-91.ams2.redhat.com [10.36.9.91]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB8CC2aP005095; Tue, 8 Dec 2009 07:12:12 -0500 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 47FE37011A; Tue, 8 Dec 2009 13:11:58 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 8 Dec 2009 13:11:51 +0100 Message-Id: <1260274314-2906-20-git-send-email-kraxel@redhat.com> In-Reply-To: <1260274314-2906-1-git-send-email-kraxel@redhat.com> References: <1260274314-2906-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann , agraf@suse.de, lcapitulino@redhat.com Subject: [Qemu-devel] [FOR 0.12 PATCH v4 19/22] add new -mon switch 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 Add -mon switch which maps pretty straight forward into the QemuOpts internal representation: -mon chardev=[,mode=[control|readline]][,[no]default] Via config file: [mon] chardev = "" mode = "readline" default = "on" Signed-off-by: Gerd Hoffmann --- qemu-options.hx | 7 +++++++ vl.c | 8 ++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e05b2a0..7234447 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1589,6 +1589,13 @@ The default device is @code{vc} in graphical mode and @code{stdio} in non graphical mode. ETEXI +DEF("mon", HAS_ARG, QEMU_OPTION_mon, \ + "-mon chardev=[name][,mode=readline|control][,default]\n") +STEXI +@item -mon chardev=[name][,mode=readline|control][,default] +Setup monitor on chardev @var{name}. +ETEXI + DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \ "-pidfile file write PID to 'file'\n") STEXI diff --git a/vl.c b/vl.c index bb9ffd3..d90975f 100644 --- a/vl.c +++ b/vl.c @@ -5284,6 +5284,14 @@ int main(int argc, char **argv, char **envp) monitor_parse(optarg); default_monitor = 0; break; + case QEMU_OPTION_mon: + opts = qemu_opts_parse(&qemu_mon_opts, optarg, "chardev"); + if (!opts) { + fprintf(stderr, "parse error: %s\n", optarg); + exit(1); + } + default_monitor = 0; + break; case QEMU_OPTION_chardev: opts = qemu_opts_parse(&qemu_chardev_opts, optarg, "backend"); if (!opts) {