From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYh6Q-0003BR-6q for qemu-devel@nongnu.org; Thu, 08 Dec 2011 11:45:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYh6M-0001Pp-4N for qemu-devel@nongnu.org; Thu, 08 Dec 2011 11:45:46 -0500 Received: from mail-ey0-f173.google.com ([209.85.215.173]:37360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYh6L-0001Pd-Uy for qemu-devel@nongnu.org; Thu, 08 Dec 2011 11:45:42 -0500 Received: by eaai10 with SMTP id i10so1447117eaa.4 for ; Thu, 08 Dec 2011 08:45:41 -0800 (PST) Message-ID: <4EE0E9B2.8030402@codemonkey.ws> Date: Thu, 08 Dec 2011 10:45:38 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1322857256-14951-1-git-send-email-aliguori@us.ibm.com> <1322857256-14951-10-git-send-email-aliguori@us.ibm.com> <4EE0E026.2060603@redhat.com> In-Reply-To: <4EE0E026.2060603@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 09/18] qapi: allow a 'gen' key to suppress code generation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffman , Markus Armbruster On 12/08/2011 10:04 AM, Kevin Wolf wrote: > Am 02.12.2011 21:20, schrieb Anthony Liguori: >> Signed-off-by: Anthony Liguori >> --- >> scripts/qapi-commands.py | 1 + >> scripts/qapi-types.py | 1 + >> 2 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py >> index f7def16..54d1f5d 100644 >> --- a/scripts/qapi-commands.py >> +++ b/scripts/qapi-commands.py >> @@ -405,6 +405,7 @@ except os.error, e: >> >> exprs = parse_schema(sys.stdin) >> commands = filter(lambda expr: expr.has_key('command'), exprs) >> +commands = filter(lambda expr: not expr.has_key('gen'), commands) > > Might be confusing if someone uses something like gen = True. Shouldn't > we better check the value instead of just existence? Yes, it was a lazy short cut. I'll fix appropriately. Regards, Anthony Liguori > > Kevin >