From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu13R-0003FB-6E for qemu-devel@nongnu.org; Tue, 11 Oct 2016 13:41:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bu13P-0006jS-Tz for qemu-devel@nongnu.org; Tue, 11 Oct 2016 13:41:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu13P-0006j4-KT for qemu-devel@nongnu.org; Tue, 11 Oct 2016 13:41:27 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2788C63E09 for ; Tue, 11 Oct 2016 17:41:27 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 11 Oct 2016 21:41:21 +0400 Message-Id: <20161011174121.815-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= This option does nothing since commit 06ac27f. Deprecate it. Signed-off-by: Marc-Andr=C3=A9 Lureau --- vl.c | 11 +++-------- include/monitor/monitor.h | 2 +- qemu-options.hx | 8 ++++---- 3 files changed, 8 insertions(+), 13 deletions(-) v2: - update after Markus review - fix error on default monitor - drop from qemu-trivial diff --git a/vl.c b/vl.c index eb3c5ee..3c6d5e5 100644 --- a/vl.c +++ b/vl.c @@ -2407,8 +2407,9 @@ static int mon_init_func(void *opaque, QemuOpts *op= ts, Error **errp) if (qemu_opt_get_bool(opts, "pretty", 0)) flags |=3D MONITOR_USE_PRETTY; =20 - if (qemu_opt_get_bool(opts, "default", 0)) - flags |=3D MONITOR_IS_DEFAULT; + if (qemu_opt_get_bool(opts, "default", 0)) { + error_report("option 'default' does nothing and is deprecated"); + } =20 chardev =3D qemu_opt_get(opts, "chardev"); chr =3D qemu_chr_find(chardev); @@ -2428,16 +2429,12 @@ static void monitor_parse(const char *optarg, con= st char *mode, bool pretty) QemuOpts *opts; const char *p; char label[32]; - int def =3D 0; =20 if (strstart(optarg, "chardev:", &p)) { snprintf(label, sizeof(label), "%s", p); } else { snprintf(label, sizeof(label), "compat_monitor%d", monitor_device_index); - if (monitor_device_index =3D=3D 0) { - def =3D 1; - } opts =3D qemu_chr_parse_compat(label, optarg); if (!opts) { error_report("parse error: %s", optarg); @@ -2449,8 +2446,6 @@ static void monitor_parse(const char *optarg, const= char *mode, bool pretty) qemu_opt_set(opts, "mode", mode, &error_abort); qemu_opt_set(opts, "chardev", label, &error_abort); qemu_opt_set_bool(opts, "pretty", pretty, &error_abort); - if (def) - qemu_opt_set(opts, "default", "on", &error_abort); monitor_device_index++; } =20 diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index a714d8e..8cc532e 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -9,7 +9,7 @@ extern Monitor *cur_mon; =20 /* flags for monitor_init */ -#define MONITOR_IS_DEFAULT 0x01 +/* 0x01 unused */ #define MONITOR_USE_READLINE 0x02 #define MONITOR_USE_CONTROL 0x04 #define MONITOR_USE_PRETTY 0x08 diff --git a/qemu-options.hx b/qemu-options.hx index b1fbdb0..16e5058 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2239,7 +2239,7 @@ two serial ports and the QEMU monitor: =20 @example -chardev stdio,mux=3Don,id=3Dchar0 \ --mon chardev=3Dchar0,mode=3Dreadline,default \ +-mon chardev=3Dchar0,mode=3Dreadline \ -serial chardev:char0 \ -serial chardev:char0 @end example @@ -2250,7 +2250,7 @@ multiplexed between the QEMU monitor and a parallel= port: =20 @example -chardev stdio,mux=3Don,id=3Dchar0 \ --mon chardev=3Dchar0,mode=3Dreadline,default \ +-mon chardev=3Dchar0,mode=3Dreadline \ -parallel chardev:char0 \ -chardev tcp,...,mux=3Don,id=3Dchar1 \ -serial chardev:char1 \ @@ -3112,9 +3112,9 @@ Like -qmp but uses pretty JSON formatting. ETEXI =20 DEF("mon", HAS_ARG, QEMU_OPTION_mon, \ - "-mon [chardev=3D]name[,mode=3Dreadline|control][,default]\n", QEMU_= ARCH_ALL) + "-mon [chardev=3D]name[,mode=3Dreadline|control]\n", QEMU_ARCH_ALL) STEXI -@item -mon [chardev=3D]name[,mode=3Dreadline|control][,default] +@item -mon [chardev=3D]name[,mode=3Dreadline|control] @findex -mon Setup monitor on chardev @var{name}. ETEXI --=20 2.10.0