Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmNrT-0000PP-IG for qemu-devel@nongnu.org; Tue, 02 Mar 2010 03:53:51 -0500 Received: from [199.232.76.173] (port=53681 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmNrR-0000Oz-RN for qemu-devel@nongnu.org; Tue, 02 Mar 2010 03:53:50 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NmNrQ-0003SS-FL for qemu-devel@nongnu.org; Tue, 02 Mar 2010 03:53:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7010) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NmNrQ-0003SI-1c for qemu-devel@nongnu.org; Tue, 02 Mar 2010 03:53:48 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o228rh5l003067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Mar 2010 03:53:43 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH RFC 35/48] monitor: New in_qmp_mon() References: <1267034160-3517-1-git-send-email-armbru@redhat.com> <1267034160-3517-36-git-send-email-armbru@redhat.com> <20100226164604.72c215f2@redhat.com> <20100301131837.2c8b23e1@redhat.com> Date: Tue, 02 Mar 2010 09:53:41 +0100 In-Reply-To: <20100301131837.2c8b23e1@redhat.com> (Luiz Capitulino's message of "Mon, 1 Mar 2010 13:18:37 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Luiz Capitulino writes: > On Mon, 01 Mar 2010 10:19:49 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Wed, 24 Feb 2010 18:55:47 +0100 >> > Markus Armbruster wrote: >> > >> >> >> >> Signed-off-by: Markus Armbruster >> >> --- >> >> 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 :)