qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option
@ 2016-10-11 17:41 Marc-André Lureau
  2016-10-11 18:20 ` Markus Armbruster
  2016-10-28 14:08 ` Michael Tokarev
  0 siblings, 2 replies; 6+ messages in thread
From: Marc-André Lureau @ 2016-10-11 17:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, Marc-André Lureau

This option does nothing since commit 06ac27f.  Deprecate it.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 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 *opts, Error **errp)
     if (qemu_opt_get_bool(opts, "pretty", 0))
         flags |= MONITOR_USE_PRETTY;
 
-    if (qemu_opt_get_bool(opts, "default", 0))
-        flags |= MONITOR_IS_DEFAULT;
+    if (qemu_opt_get_bool(opts, "default", 0)) {
+        error_report("option 'default' does nothing and is deprecated");
+    }
 
     chardev = qemu_opt_get(opts, "chardev");
     chr = qemu_chr_find(chardev);
@@ -2428,16 +2429,12 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty)
     QemuOpts *opts;
     const char *p;
     char label[32];
-    int def = 0;
 
     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 == 0) {
-            def = 1;
-        }
         opts = 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++;
 }
 
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;
 
 /* 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:
 
 @example
 -chardev stdio,mux=on,id=char0 \
--mon chardev=char0,mode=readline,default \
+-mon chardev=char0,mode=readline \
 -serial chardev:char0 \
 -serial chardev:char0
 @end example
@@ -2250,7 +2250,7 @@ multiplexed between the QEMU monitor and a parallel port:
 
 @example
 -chardev stdio,mux=on,id=char0 \
--mon chardev=char0,mode=readline,default \
+-mon chardev=char0,mode=readline \
 -parallel chardev:char0 \
 -chardev tcp,...,mux=on,id=char1 \
 -serial chardev:char1 \
@@ -3112,9 +3112,9 @@ Like -qmp but uses pretty JSON formatting.
 ETEXI
 
 DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
-    "-mon [chardev=]name[,mode=readline|control][,default]\n", QEMU_ARCH_ALL)
+    "-mon [chardev=]name[,mode=readline|control]\n", QEMU_ARCH_ALL)
 STEXI
-@item -mon [chardev=]name[,mode=readline|control][,default]
+@item -mon [chardev=]name[,mode=readline|control]
 @findex -mon
 Setup monitor on chardev @var{name}.
 ETEXI
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option
  2016-10-11 17:41 [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option Marc-André Lureau
@ 2016-10-11 18:20 ` Markus Armbruster
  2016-10-12  8:46   ` Dr. David Alan Gilbert
  2016-10-27  8:54   ` Dr. David Alan Gilbert
  2016-10-28 14:08 ` Michael Tokarev
  1 sibling, 2 replies; 6+ messages in thread
From: Markus Armbruster @ 2016-10-11 18:20 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: qemu-devel, David Alan Gilbert, Paolo Bonzini

Marc-André Lureau <marcandre.lureau@redhat.com> writes:

> This option does nothing since commit 06ac27f.  Deprecate it.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  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

Suggest to squash in the appended patch.

Reviewed-by: Markus Armbruster <armbru@redhat.com>

Could go via David, Paolo or myself.  David, do you have anything
pending right now?


diff --git a/monitor.c b/monitor.c
index b07f254..ab9e911 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4093,7 +4093,7 @@ QemuOptsList qemu_mon_opts = {
             .name = "chardev",
             .type = QEMU_OPT_STRING,
         },{
-            .name = "default",
+            .name = "default",  /* deprecated */
             .type = QEMU_OPT_BOOL,
         },{
             .name = "pretty",

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option
  2016-10-11 18:20 ` Markus Armbruster
@ 2016-10-12  8:46   ` Dr. David Alan Gilbert
  2016-10-13  6:40     ` Markus Armbruster
  2016-10-27  8:54   ` Dr. David Alan Gilbert
  1 sibling, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2016-10-12  8:46 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Marc-André Lureau, qemu-devel, Paolo Bonzini

* Markus Armbruster (armbru@redhat.com) wrote:
> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> 
> > This option does nothing since commit 06ac27f.  Deprecate it.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  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
> 
> Suggest to squash in the appended patch.
> 
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> 
> Could go via David, Paolo or myself.  David, do you have anything
> pending right now?

I don't have anything pending at the moment; but I could
take it; it doesn't seem especially urgent.

Dave

> 
> 
> diff --git a/monitor.c b/monitor.c
> index b07f254..ab9e911 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4093,7 +4093,7 @@ QemuOptsList qemu_mon_opts = {
>              .name = "chardev",
>              .type = QEMU_OPT_STRING,
>          },{
> -            .name = "default",
> +            .name = "default",  /* deprecated */
>              .type = QEMU_OPT_BOOL,
>          },{
>              .name = "pretty",
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option
  2016-10-12  8:46   ` Dr. David Alan Gilbert
@ 2016-10-13  6:40     ` Markus Armbruster
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2016-10-13  6:40 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: Marc-André Lureau, qemu-devel, Paolo Bonzini

"Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:

> * Markus Armbruster (armbru@redhat.com) wrote:
>> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
>> 
>> > This option does nothing since commit 06ac27f.  Deprecate it.
>> >
>> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> > ---
>> >  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
>> 
>> Suggest to squash in the appended patch.
>> 
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>> 
>> Could go via David, Paolo or myself.  David, do you have anything
>> pending right now?
>
> I don't have anything pending at the moment; but I could
> take it; it doesn't seem especially urgent.

Please do.  Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option
  2016-10-11 18:20 ` Markus Armbruster
  2016-10-12  8:46   ` Dr. David Alan Gilbert
@ 2016-10-27  8:54   ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2016-10-27  8:54 UTC (permalink / raw)
  To: Markus Armbruster, qemu-trivial
  Cc: Marc-André Lureau, qemu-devel, Paolo Bonzini

* Markus Armbruster (armbru@redhat.com) wrote:
> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> 
> > This option does nothing since commit 06ac27f.  Deprecate it.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  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
> 
> Suggest to squash in the appended patch.
> 
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> 
> Could go via David, Paolo or myself.  David, do you have anything
> pending right now?

I said I'd take this via the HMP tree, but I've not got anything else
to go in after 2 weeks, and it's pointless doing a pull on it's own
for this.

It seems best to go via trivial - (copied in).

Dave

> 
> diff --git a/monitor.c b/monitor.c
> index b07f254..ab9e911 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4093,7 +4093,7 @@ QemuOptsList qemu_mon_opts = {
>              .name = "chardev",
>              .type = QEMU_OPT_STRING,
>          },{
> -            .name = "default",
> +            .name = "default",  /* deprecated */
>              .type = QEMU_OPT_BOOL,
>          },{
>              .name = "pretty",
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option
  2016-10-11 17:41 [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option Marc-André Lureau
  2016-10-11 18:20 ` Markus Armbruster
@ 2016-10-28 14:08 ` Michael Tokarev
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2016-10-28 14:08 UTC (permalink / raw)
  To: Marc-André Lureau, qemu-devel; +Cc: armbru, QEMU Trivial

11.10.2016 20:41, Marc-André Lureau wrote:
> This option does nothing since commit 06ac27f.  Deprecate it.

Applied to -trivial, together with additional hunk from Marcus,
thanks!

/mjt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-28 14:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11 17:41 [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option Marc-André Lureau
2016-10-11 18:20 ` Markus Armbruster
2016-10-12  8:46   ` Dr. David Alan Gilbert
2016-10-13  6:40     ` Markus Armbruster
2016-10-27  8:54   ` Dr. David Alan Gilbert
2016-10-28 14:08 ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).