qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] monitor: print message when using 'help' with a


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] monitor: print message when using 'help' with an unknown command
Date: Thu, 19 Jul 2018 20:11:58 +0100
User-agent: Mutt/1.10.0 (2018-05-17)

* Markus Armbruster (address@hidden) wrote:
> You neglected to cc: maintainers.  Cc'ing them increases the odds your
> patch will be noticed and picked up.  You can use
> scripts/get_maintainer.pl to find maintainers.  You don't have to do
> anything for this patch; it got noticed anyway.
> 
> David, this is yours :)

Thanks!

Dave

> Collin Walling <address@hidden> writes:
> 
> > When typing 'help' followed by an unknown command, QEMU will
> > not print anything to the command line to let the user know
> > they typed a bad command. Let's fix this by printing a message
> > to the monitor when this happens. For example:
> >
> >     (qemu) help xyz
> >     unknown command: 'xyz'
> >
> > Reported-by: Stefan Zimmermann <address@hidden>
> > Signed-off-by: Collin Walling <address@hidden>
> > ---
> >  monitor.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/monitor.c b/monitor.c
> > index 7af1f18..7942f9f 100644
> > --- a/monitor.c
> > +++ b/monitor.c
> > @@ -1034,9 +1034,12 @@ static void help_cmd_dump(Monitor *mon, const 
> > mon_cmd_t *cmds,
> >              } else {
> >                  help_cmd_dump_one(mon, cmd, args, arg_index);
> >              }
> > -            break;
> > +            return;
> >          }
> >      }
> > +
> > +    /* Entry not found */
> > +    monitor_printf(mon, "unknown command: '%s'\n", args[arg_index]);
> >  }
> >  
> >  static void help_cmd(Monitor *mon, const char *name)
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]