From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm8KU-0002Fy-Cg for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:18:46 -0500 Received: from [199.232.76.173] (port=52520 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm8KU-0002Fc-0P for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:18:46 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nm8KS-0008Ng-TT for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:18:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34812) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nm8KS-0008NT-BZ for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:18:44 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o21GIhHT014453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Mar 2010 11:18:43 -0500 Date: Mon, 1 Mar 2010 13:18:37 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH RFC 35/48] monitor: New in_qmp_mon() Message-ID: <20100301131837.2c8b23e1@redhat.com> In-Reply-To: References: <1267034160-3517-1-git-send-email-armbru@redhat.com> <1267034160-3517-36-git-send-email-armbru@redhat.com> <20100226164604.72c215f2@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org 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()? Or should we start exporting monitor names as 'mon_' to make them short?