Marc-André Lureau <[email protected]> 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é Lureau <[email protected]> > --- > 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 *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' is deprecated"); Perhaps "does nothing and is deprecated"? > + } > > chardev = qemu_opt_get(opts, "chardev"); > chr = 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; > > /* 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 > > bool monitor_cur_is_qmp(void); > > 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
