From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl68d-00041g-HL for qemu-devel@nongnu.org; Fri, 26 Feb 2010 14:46:15 -0500 Received: from [199.232.76.173] (port=53243 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl68d-00041P-1M for qemu-devel@nongnu.org; Fri, 26 Feb 2010 14:46:15 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nl68b-0007F3-TN for qemu-devel@nongnu.org; Fri, 26 Feb 2010 14:46:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60269) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nl68b-0007El-Bi for qemu-devel@nongnu.org; Fri, 26 Feb 2010 14:46:13 -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 o1QJkC3q019608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 26 Feb 2010 14:46:12 -0500 Date: Fri, 26 Feb 2010 16:46:04 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH RFC 35/48] monitor: New in_qmp_mon() Message-ID: <20100226164604.72c215f2@redhat.com> In-Reply-To: <1267034160-3517-36-git-send-email-armbru@redhat.com> References: <1267034160-3517-1-git-send-email-armbru@redhat.com> <1267034160-3517-36-git-send-email-armbru@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 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.