Received: from eggs.gnu.org ([2001:4830:134:3::10]:60622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu0T4-00085x-MZ for qemu-devel@nongnu.org; Tue, 11 Oct 2016 13:03:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bu0Sy-0002Xe-J7 for qemu-devel@nongnu.org; Tue, 11 Oct 2016 13:03:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu0Sy-0002XI-A4 for qemu-devel@nongnu.org; Tue, 11 Oct 2016 13:03:48 -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 4D5603D943 for ; Tue, 11 Oct 2016 17:03:47 +0000 (UTC) From: Markus Armbruster References: <20161011134759.26699-1-marcandre.lureau@redhat.com> Date: Tue, 11 Oct 2016 19:03:44 +0200 In-Reply-To: <20161011134759.26699-1-marcandre.lureau@redhat.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Tue, 11 Oct 2016 17:47:59 +0400") Message-ID: <87r37m7r7z.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] monitor: deprecate 'default' option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: qemu-devel@nongnu.org, pbonzini@redhat.com Marc-Andr=C3=A9 Lureau writes: > This option appears to be unused and undocumented, deprecate it. It's not quite "undocumented", but the documentation (in qemu-options.hx) is useless. Suggest This option does nothing since commit 06ac27f. Deprecate it. > > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > vl.c | 5 +++-- > include/monitor/monitor.h | 7 +++---- > qemu-options.hx | 8 ++++---- > 3 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/vl.c b/vl.c > index eb3c5ee..4f08c1b 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=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' is deprecated"); Perhaps "does nothing and is deprecated"? > + } >=20=20 > chardev =3D qemu_opt_get(opts, "chardev"); > chr =3D qemu_chr_find(chardev); > diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h > index a714d8e..bf88707 100644 > --- a/include/monitor/monitor.h > +++ b/include/monitor/monitor.h > @@ -9,10 +9,9 @@ > extern Monitor *cur_mon; >=20=20 > /* flags for monitor_init */ > -#define MONITOR_IS_DEFAULT 0x01 > -#define MONITOR_USE_READLINE 0x02 > -#define MONITOR_USE_CONTROL 0x04 > -#define MONITOR_USE_PRETTY 0x08 > +#define MONITOR_USE_READLINE 0x01 > +#define MONITOR_USE_CONTROL 0x02 > +#define MONITOR_USE_PRETTY 0x04 Can we avoid the churn? Like this: /* flags for monitor_init */ -#define MONITOR_IS_DEFAULT 0x01 +/* 0x01 unused */ #define MONITOR_USE_READLINE 0x02 >=20=20 > bool monitor_cur_is_qmp(void); >=20=20 > 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=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=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=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