Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm1n9-0007cs-Al for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:19:55 -0500 Received: from [199.232.76.173] (port=51592 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm1n8-0007cP-Rn for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:19:54 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nm1n7-0008AH-Bx for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:19:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30953) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nm1n6-0008A7-UA for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:19:53 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o219Jps9010048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Mar 2010 04:19:52 -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> Date: Mon, 01 Mar 2010 10:19:49 +0100 In-Reply-To: <20100226164604.72c215f2@redhat.com> (Luiz Capitulino's message of "Fri, 26 Feb 2010 16:46:04 -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 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?