Luiz Capitulino <lcapitul...@redhat.com> writes: > On Mon, 01 Mar 2010 10:19:49 +0100 > Markus Armbruster <arm...@redhat.com> wrote: > >> Luiz Capitulino <lcapitul...@redhat.com> writes: >> >> > On Wed, 24 Feb 2010 18:55:47 +0100 >> > Markus Armbruster <arm...@redhat.com> wrote: >> > >> >> >> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> >> >> --- >> >> 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()?
Works for me. > Or should we start exporting monitor names as 'mon_' to make them short? Fine with me, but not in my patch series, it's plenty long already :)