qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 35/48] monitor: New in_qmp_mon()


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH RFC 35/48] monitor: New in_qmp_mon()
Date: Mon, 1 Mar 2010 13:18:37 -0300

On Mon, 01 Mar 2010 10:19:49 +0100
Markus Armbruster <address@hidden> wrote:

> Luiz Capitulino <address@hidden> writes:
> 
> > On Wed, 24 Feb 2010 18:55:47 +0100
> > Markus Armbruster <address@hidden> wrote:
> >
> >> 
> >> Signed-off-by: Markus Armbruster <address@hidden>
> >> ---
> >>  monitor.c |    5 +++++
> >>  monitor.h |    2 ++
> >>  2 files changed, 7 insertions(+), 0 deletions(-)
> >> 
> >> diff --git a/monitor.c b/monitor.c
> >> index a4263af..5c87a98 100644
> >> --- a/monitor.c
> >> +++ b/monitor.c
> >> @@ -194,6 +194,11 @@ static inline int monitor_ctrl_mode(const Monitor 
> >> *mon)
> >>      return (mon->flags & MONITOR_USE_CONTROL);
> >>  }
> >>  
> >> +int in_qmp_mon(void)
> >> +{
> >> +    return cur_mon && monitor_ctrl_mode(cur_mon);
> >> +}
> >> +
> >
> >  Afaik, all public monitor functions begin with 'monitor_'. While it's
> > debatable if it's a good name, let's keep the consistency.
> >
> >  Also, I'm going to rename monitor_ctrl_mode() to something like
> > monitor_qmp_mode() or monitor_is_qmp(). In this case the difference with
> > in_qmp_mon() is not clear.
> 
> Care to suggest a name?

 Maybe, monitor_ctrl_mode() should be monitor_is_qmp() and the new one
monitor_cur_is_qmp()?

 Or should we start exporting monitor names as 'mon_' to make them short?




reply via email to

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